Question: What is obligatory upon the believer in times of tribulation, given that he must pursue means of livelihood—what should he do and what should he avoid?
Answer: It has been narrated from the Commander of the Faithful that he answered this question, saying: “Be during tribulation like the young camel: it has no back to be ridden, nor udders to be milked.”
The meaning is: strive with all your effort to remain distant from assisting the wrongdoers or cooperating with them, such that they derive no benefit from you whatsoever. All of this should be accompanied by outward social interaction, exactly as it is said: “Be moderate, and walk to the side.” It suffices for him to denounce evil in his heart, and it is not permissible for him to attend gatherings in which sinful acts are committed.
As for means of livelihood, they are diverse; he should pursue from among them that which is closest to safeguarding his religion.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.3