Question 2: 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 Allah for help, such as the dead, absent or unseen beings, trees, stones, stars, and the like, they are Mushriks (those who associate others with Allah in worship) who are committing major Shirk that take them out of the Din (religion) of Islam. It is not permissible to take them as allies, as is the case with the Kafir. Performing Salah behind them is invalid. It is also not permissible to associate with them or live… read more here.