Question:
I work as a painter. I have been called to paint a temple. Can I go and do this painting work?
Answer:
In Islam, what is Haram (forbidden) and Halal (permissible) is clear. Additionally, assisting in a Haram act is also Haram. The Quran says in Surah Al-Ma’idah (5:2): “…And cooperate in righteousness and piety, but do not cooperate in sin and aggression…”
Painting a temple is aiding in an act of worship directed towards other than Allahﷻ . Shirk (associating partners with Allahﷻ ) is the greatest sin. Helping in any activity that facilitates Shirk is prohibited. This includes building temples, painting them, or any work that supports such places of worship. This is the consensus of scholars worldwide; there is no difference of opinion on this.
You can work on other buildings, but not on a temple where idols are worshipped. If invited, you can politely decline, citing other commitments if necessary to avoid friction. The Prophetﷺ Ibrahim (AS) also used an excuse (saying he was sick) to avoid attending a polytheistic festival. Your livelihood should not come from aiding in what is forbidden.