The probability is very low, but still there exists a risk of hiv transmission thru razors. If a hiv person's blood is present on the razor (from a cut while shaving) and if it is not cleaned and dried properly before being used, a cut or a scrape in your face while using the same razor can transmit hiv.
The chance of hiv surviving for a long time in a razor is low compared to needles. Hiv has been known to survive in needle tips for upto several hours.
Always avoid using razors previously used by an unknown person.