Abstract : By sharing contaminated needles, injecting drug users contribute in a significant manner to the spread of the human immunodeficiency virus (HIV) in Asia and in some European countries. Furthermore, injecting drug users may also be sex workers, and risky sexual activities allow the virus to spread to other parts of the population. Mathematical models of needle sharing have been used to evaluate the success of needle exchange programs, and have led to advances such as new legislations. We use epidemiological classes to model how injecting drug users may start or cease sharing needles under social influences, and may become infected with HIV when sharing. Numerous models based on epidemiological classes were proposed regarding several aspects of HIV, and were commonly studied by differential equations. We instead show how to analyze the theoretical behaviour of the model using the technique of discrete Markov chains. Using simulations, we observed that the prevalence of HIV depended very little on the probability of transmission of HIV when sharing a needle, but almost only on the encouragement and discouragement regarding needle sharing in the community. By measuring the cost of resources required to decrease factors encouraging needle sharing and to increase discouraging ones, our model could be refined to provide an estimate of the expected prevalence of HIV among injecting drug users.