All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
We have already stated the ruling of cooperating or working where forbidden material is sold. See our Fatwa: 83206.
The nature of your work may have one of the following two situations:
First, your work may involve selling forbidden items or committing that which is forbidden, such as staying alone with an alien or marriageable man or neglecting Hijab, or touching alien or marriageable men, or the like. In this case, working at that market is forbidden. Similarly, it is forbidden to cooperate in selling what is forbidden for the saying of Allaah (which means): {…And cooperate in righteousness and piety, but do not cooperate in sin and aggression. And fear Allaah; indeed, Allaah is severe in penalty.}[5:2].
The Prophet said: "Allaah has cursed wine, its drinker, its server, its seller, its buyer, its presser, the one who demands it to be pressed, its carrier, the one to whom it is conveyed and the one who consumes its price." [Abu Daawood and Al Haakim]
The Prophet cursed every one who cooperates in making or drinking wine, no matter what kind of involvement he had.
Second, your work does not involve cooperating or selling something forbidden and you do not commit any thing forbidden during your work. In this case, you are allowed to work in that market provided you do not carry out or provide any cooperation, even by writing or carrying a paper, in any forbidden matter.
However, you have to enjoin good and forbid evil, for the saying of the Prophet who said: "He who amongst you sees something abominable should change it with his hand; and if he is unable to do it, then with his tongue, and if is unable to do it, then he should (abhor it) from his heart, and that is the lowest level of faith." [Muslim]
Allaah knows best.