Can you tell me if it is possible to buy a resident visa as an expat visiting Sharjah, UAE? I was told by my friend that companies can sell this to me without my first having a job.
Please just trying to understand if this offer is legitimate.
There are a couple of different categories of residence visas for the UAE: employment, family, students, investors and domestic workers. If you don't fit into any of these categories then you don't qualify for a residence permit for the UAE.
These companies your friend has told you about don't sound legitimate. A residence permit can't be "sold" to someone - a genuine residence permit must be applied for and may then be granted if the application is approved. There are some legitimate companies who might assist with putting together the application and gathering the required documents as this can be quite an arduous task, but this is quite distinct from companies who will simply give you a permit if you pay them. So I would be very wary of doing business with them if I were in your position.
You can read more about UAE visa requirements on our Visas for Dubai page - the process is outlined quite clearly there.
The duration of residence visa depends on the type of sponsor and the person sponsored. It is issued for one, or two or three years. Visa is renewed subject to conditions similar to those of fresh visas.
The family's residence permits are linked to the residence permit of the sponsoring expatriate employee. If the sponsoring family member's visa is cancelled, it requires cancellation of the visas of the dependents.
Dependents are granted a 30-day grace period from the date of expiry or cancellation of their visa to obtain a new residence permit. If the employee fails to renew or cancel the visa of his dependents, the dependents would be deemed illegal residents and could be liable to pay a fine.