Chapter: The Prohibition of Ostentation (riyaʾ)
Allah the Exalted says, “They were commanded only to worship Allah, dedicating the religion exclusively to Him in pure faith.” (Q 98:5)
He also says, “Do not invalidate your charities with reminders of generosity and harm, like one who spends his wealth only to be seen by people.” (Q 2:264)
And He says, “They ostentatiously show themselves to people, while they remember Allah but little.” (Q 4:142)
[Explanation]
Imam al-Nawawi—may Allah have mercy on him—writes in his Riyad al-Salihin under the heading “The Prohibition of Ostentation”: Riyaʾ is the verbal noun of raʾā (he saw). One says: raʾā, yurāʾī, riyaʾan and murāʾatan, just as one says: jāhada, yujāhidu, jihādan and mujāhadah. What is meant by riyaʾ here is that a person worships his Lord, yet beautifies the act of worship so that people will notice and say, “How devout he is, how excellent his worship,” and the like. He wants people to praise him for his devotion; he does not intend to draw near to them by means of the act itself—for that would be major shirk. Rather, he wants them to praise him for his worship of Allah, so they will say, “So-and-so is devoted, so-and-so fasts often, so-and-so gives abundant charity,” and similar remarks. Thus he is not sincere to Allah in his deed; he only seeks people’s commendation for it and is therefore showing off. A small amount of riyaʾ is minor shirk, whereas much of it constitutes major shirk.
The author—may Allah have mercy on him—then cites as evidence for its prohibition several verses, among them the statement of Allah the Exalted, “They were commanded only…"