Prayer for the sake of Allah or for the people around you? RIYAA - The Hidden Shirk
Riyaa is to perform acts which are pleasing to Allah with the intention of pleasing other than Allah.
The Messenger of Allah (pbuh) said "Should I not inform you of that which i fear for you even more than the dangers of Dajjal? It is the hidden Shirk; A person stands to pray, and he beautifies his prayer because he sees the people looking at him." Sunan Ibn Majah Vol 2, 3389
Causes of Riyaa
The primary cause is a weakness in Iman. A person weak in his Iman will prefer the admiration of people over the pleasure of Allah. In a hadith of the first three people thrown into the hellfire; the scholar (who taught for fame), the martyr (who fought for fame), and the charitable person (who did so that people would call him generous). All three acts even though being amongst some of the most pleasing ones to Allah are not accepted since these people desired the pleasure of people over the pleasure of Allah.
The dislike of criticism is another reason for Riyaa. Either the person neglects a command of Allah to avoid criticism from his peers or he obeys certain commands of Allah (swt) since people will criticise him if he does not do it.
Another reason is greed for possessions. If a person for example is jealous of a position of a certain person in society, he will try every possible means to attain the same position which leads him to spending his time putting on a show for other people so that they admire him.
Some scholars advised: "Remove the causes of riyaa from yourself by considering the opinion of people as important to you as animals and small children. Do not differentiate in your worship between the presence of people or their absence, or between their knowledge of your actions and their ignorance. Rather be conscious of the infinite knowledge of Allah alone."
Ways to avoid Riyaa
1) Increasing knowledge of Islam
2) Dua (Supplication)
The Prophet (pbuh) taught the specific dua for riyaa: "Allahumma inna na-oothu bika an-nushrika bika shay'an na'lamuhu, wa nastagfiruka limaa laa na'lamuh." "O Allah, we seek refuge in you from committing shirk knowingly, and ask your forgiveness for (the shirk that we may commit unknowingly)".
3) Reflecting upon Heaven and Hell
4) Hiding one's good deeds
5) Reflection upon oneself's shortcomings
6) Accompanying the pious
7) Knowledge of Riyaa
Most Imaams/people pray with care, slowly and beautifying their prayer when they are leading a prayer while they pray in different manner when they are praying individually. Please take special care of the matter. We are praying to Allah in both cases, then why is the difference ? Don't differentiate your prayer at different situations.