The aim of this study was to assess the importance of situational, social and psychological contextual factors in injecting drug users' (IDUs) decisions concerning HIV risk behavior. The sample included 84 IDUs recruited in Sydney, Australia. A computer game-like format was used to generate hypothetical injecting events. Levels of situational factors were varied randomly between situations. These included needle availability, bleach availability, craving, how well known potential sharing partners were, previous sharing, privacy of site and the degree to which individuals were high drunk or stoned. Responses to choices in each injecting event included the likelihood of sharing in each situation, the frequency with which they had experienced the hypothetical situation in real life, and their satisfaction with their response. Canonical correlation analysis indicated that the association between situational influences and choice variables accounted for 87.78% of the variance. Sharing needles was negatively related to decision satisfaction and experience with an actual situation indicating that users had internalized HIV preventive norms and were not likely to share on a normal basis. Choices about needle sharing were primarily constrained by the trade-off between needle availability and craving while social factors played a secondary role. The probability of sharing increased as other people present were better known and previous sharing history increased. This pattern of results suggest that while needle exchanges will be effective, they may fail to reach their full potential unless factors related to substance use and social context are also addressed. The current methodology appeared to be a useful tool for studying the influence of the context of injecting events on behavior.