Question: Is it permissible for a man who lives among a community of people who invoke help from other than Allaah to perform Salaah (prayer) behind them (when they lead the congregational prayers)? Is it obligatory to disassociate oneself from them? Is what they are doing count as major Shirk (associating others with Allaah in His Divinity or worship)? Is making allies of them judged the same as making allies of true Kaafirs (disbelievers)?
Answer: If the state of the people you are living among is as you described: they call upon other than Allaah for help, such as the dead, absent or unseen beings, trees, stones, stars, and the like, they are Mushriks (those who associate others with Allaah in worship) who are committing major Shirk that take them out of the Deen (religion) of Islaam… read more here.