The second stage...
The second stage, too, is comprised of two steps: At the first step an individual demonstrates his piety and virtuous deeds. At the second step one pretends to have done away with the antitheses of piety and virtue, and behaves in such a manner as if he is free from all vices, and the aim of all this is to win the confidence of others.
The third stage of Riya’, which is considered to be overt by the fuqaha ’, also consists of two steps: The first step is marked by an individual’s performance of the prescribed forms of piety, prayers and good deeds in front of other people with the intention of demonstrating his good qualities and praiseworthy habits, or by his posture as a person who strictly adheres to the religious commands on purely rational grounds, and thus wishing to win the hearts of people and attracting their attention towards himself.
One who is guilty of this sin, if he does not believe genuinely in those ideas which he pretends to believe in, is counted among the munafiqun (hypocrites), whose place is in the Fire, and he is doomed to eternal damnation and his punishment is the severest of punishments.
But if he believes in them, and for the sake of winning peoples’ hearts and for obtaining worldly honor and dignity he makes an ostentation of them, though he is not reckoned among munafiqun, this kind of hypocrisy will cause the light of faith to fade away from his heart and to make the darkness of infidelity and faithlessness to occupy the domain of his heart.
Because in the first instance this person commits polytheism ( shirk ) of the covert type; while his religious beliefs and acts should purely be meant for God and His Holy Essence, he is guilty of committing the sin of doing them for others and thus makes them to share what should absolutely belong to Him only. In this way he makes others partners to God and has given permission to the Devil to occupy his heart as if it does not belong to God.