You should try hard to devote yourself to Allah, stay away from Riya' and seek Allah's Help in doing this. You should keenly know the different kinds of Riya' to avoid them. You should ponder over the punishment for Riya' in the worldly life and in the Hereafter, for any who does so will sure dislike Riya'; it will avail him nothing and will not ward off people's harm. On the contrary, this will bring upon him Allah's Anger and Discontent, and he will thereby lose both the worldly life and the Hereafter. It was reported in the Two Sahih (authentic) Books of Hadith (i.e. Al-Bukhari and Muslim) that the Prophet (peace be upon him) said,
If anyone wants to have his deeds widely publicized, Allah will make known (his faults). And if anyone makes a hypocritical display (of his deeds) Allah will make a display of (his faults).
One can get rid of this malady by asking Allah's rescue and refuge from it. One should remember (Part No. 1; Page No. 361) that Riya' is one of the actions of the hypocrites mentioned in Allah's Saying,
Verily, the hypocrites seek to deceive Allâh, but it is He Who deceives them. And when they stand up for As-Salât (the prayer), they stand with laziness and to be seen of men, and they do not remember Allâh but little.
It was reported that the Prophet (peace be upon him) addressed his Sahabah (Companions of the Prophet) saying,
"O people, fear Shirk (associating others with Allah in His Divinity or worship) for it is more hidden than the creeping of an ant." They asked, "How do we avoid it, O Messenger of Allah?" He (peace be upon him) replied, "Say: 'O Allah, we seek refuge in You from knowingly committing shirk with You and we ask Your forgiveness for what we do not know about.'"
Al-Tabarany on the authority of
Abu Musa Al-Ash`ary (may Allah be pleased with him.)