RIYA OR SHOWING OFF
Riya or Riyya' is an Arabic word which means to show off that you are a good Muslimor a devout believer in front of others just to look good in front of them while your intention is not to please Allah سبحانه و تعالى but instead to make yourself look better in the eyes of other people. It is a form of deceiving people and is not permitted in Islam. An example of riya is when a person shows off that they've given a lot of money to charity in front of others and they have done this in order to gain the reputation of being a charitable person in the community.
Linguistically, riyâ' comes from the root ra 'â . which means "to see. to behold, to view." The derived word riyâ ' means "eyeservice; hypocrisy, dissimulation; dissemblance.'"
Abu Saeed رضي الله عنه reported that the Messenger of Allah ﷺ came to us while we were discussing about Dajjal (the False Messiah) and 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 (Riya); A person stands to pray, and he beautifies his prayer because he sees the people looking at him." (Sunan Ibn Majah 2604 and 4202)
It should be noted that the Shaytaa n is keen to make the Muslimfall into things to make him do a good deed in order to show off and for the sake of his reputation, and not sincerely for the sake of Allah سبحانه و تعالى, Mahmud ibn Labeed reported: The Messenger of Allah ﷺ, peace be upon him, said, “Verily, what I fear most for you is the lesser idolatry.” They said, “What is the lesser idolatry, O Messenger of Allah?” He said, “It is showing off. Allahthe Exalted will say to them on the Day of Resurrection when the people are being rewarded for their deeds: Go to those whom you wished would see you in the world and look, do you find any reward with them?” MUSNAD AHMAD Vol 5: 428 or 23119 andal-Baghawi in Sharh as-Sunnah 4135
A person makes a display of his religious beliefs, and shows off his knowledge of religious teachings in order to project himself as an honest person in the eyes of people in order to gain their confidence and respect.
The individual demonstrates his piety and virtuous deeds and he then behaves in such a manner as if he is free from all vices. The aim behind such actions is to win the confidence of others. For example, a person May give charity or claim great spirituality in order to win respect and praise.
It is marked by an individual's overt performance of the prescribed forms of acts of worships and good deeds in front of other people on purely rational grounds and with the intention of posing himself as a person who strictly adheres to the religious commands or abstains from evil deeds. He thus wishes to win the hearts of people and attract their attention towards himself in the name of religion. For example, a person may observe obligatory prayers strictly on time or pray night prayers in order to be known as virtuous and God fearing by his circle of friends or common people. 
As mentioned in a hadith of the first three people being thrown into the hellfire; the scholar (who taught for fame), the martyr (who fought for fame), and the person who gave his money in charity (so people would say he is generous). All three of these people desired the pleasure of people over the pleasure of Allah سبحانه و تعالى. The person who desires the praise of people must feel some pride in himself, for he feelshimself worthy of being praised. There is a danger, therefore, of him becoming arrogant and boastful.
No one likes to be criticized. The dislike of criticism regarding religious practices may be divided into two categories:
a) The first category is that of a person who neglects a commandment of Allahسبحانه و تعالى in order to avoid the criticism of his followers.
If a person covets what other people possess, whether it is rank, money or power, then he will wish them to envy him similarly. For example, if he is jealous of a position of a certain person in society, he will try by every possible means to attain the same position. Such desires lead people to spend their lives putting on a show for other people so that they will admire their rank, money or power. 
Knowing the effects of showing off and how it will be judged in the Hereafter. Not knowing this leads to one falling into this sin or persisting in it. One should realize that showing off destroys all one’s actions (i.e., cancels out the reward), and that it brings the wrath of Allah سبحانه و تعالى. The wise person does not waste his energy in doing things that do not bring any reward, let alone deeds that bring the wrath and anger of Allah. One of the greatest hadith (prophetic narrations) concerning the punishment in the Hereafter of those who show off is the following,
Al-Walid bin Abi Al-Wald abu ‘Utthman Al-Mada’ini narrated that ‘Uqbah bin Muslim narrated to him, that shufaiy Al-Asbahi narrated that he entered Al-Madinah and saw a man around whom the people had gathered. He asked:” Who is this?” They said: “Abu Hurairah رضي الله عنه .” (He said):So I got close to him until I was sitting in front of him as he was narrating to the people. When he was silent and alone, I said to him: ” I ask you absolute truth if you would narrate to me a Hadith which you heard from the Messenger of Allah ﷺ, That you understand and know.” So Abu Hurairah رضي الله عنه said: “You want me to narrate a Hadith to you which the Messenger of Allah ﷺ narrated to me that I understand and know.” Then Abu Hurairah رضي الله عنه began sobbing profusely. We sat for a while, then he recovered and said: “I shall narrate to you a Hadith which the Messenger of Allah ﷺ narrated in this House, while there was no one with us other than he and I.” Then, again, Abu Hurairah رضي الله عنه began sobbing severely. Then he recovered, and wiped his face, and said: “you want me to narrate to you a Hadith which the Messenger of Allah ﷺ narrated while he and I were sitting in this House, and no one was with us but he and I.” Then Abu Hurairah رضي الله عنه began sobbing severely. Then he bent, falling on his face, so I supported him for a long time. Then he recovered and said: “The Messenger of Allah ﷺ narrated to me that on the Day of Judgement, Allah, Most High, will descend to His slaves t judge between them. Every nation shall be kneeling. The first of those who will be called before him will be a man who memorized the Qur’an, and a man who was killed in Allah’s cause, and a wealthy man. Allah سبحانه و تعالى will say to the reciter: ‘Did I not teach you what I revealed to My Messenger?” He says: ‘Of course O Lord!’ He says: ‘Then what did you do with what you learned?’ He said: ‘I would stand (in prayer reciting) with it during all hours of the night and all hours of the day.’ Then Allah would say to him: ‘You have lied.’ And the angels will say: ‘You have lied.’ Allah سبحانه و تعالى will say to him: ‘Rather, you wanted it to be said that so-and-so is a reciter. And that was said.’ The person with the wealth will be brought, and Allah سبحانه و تعالى will say to him: ‘Was I not so generous with you, such that I did not leave you having any need from anyone?’ He will say: ‘Of course O Lord!’ He says: ‘Then what did you do with what I gave to you?’ He says: ‘I would nurture the ties of kinship and give charity.’ Then Allah سبحانه و تعالى will say to him: ‘You have lied.’ And the angels will say to him: ‘You have lied.’ Allahسبحانه و تعالى , Most High, will say: ‘Rather, you wanted it to be said that so-and-so is so generous, and that was said.’ Then the one who was killed in Allah’s cause shall be brought, and Allah سبحانه و تعالى will say to him: ‘For what were you killed?’ So he says: ‘I was commanded to fight in Your cause , so I fought until I was killed.’ Allah [Most High] will say to him: ‘You have lied.’ And the angels will say to him: ‘You have lied.’ Allah [Most High] will say: ‘Rather, you wanted it be said that so-and-so is brave, and that was said.’ “Then the Messenger of Allah ﷺ hit me on my knees and said: ‘O Abu Hurairah رضياللهعنه! These first three are the creatures of Allah سبحانه و تعالى with whom the fire will be enflamed on the Day of Judgement.’ SUNAN TIRMIDHI (Vol. 4, Hadith 2382)
Ibn Abbas رضي الله عنه reported Allah’s Messenger ﷺ as saying: If anyone wants to have his deeds widely publicised, Allah will publicise (his humiliation). And if anyone makes a hypocritical display (of his deeds) Allah will make a display of him. (SAHIH AL MUSLIM Hadith 7115)
Abu Sa’eed رضي الله عنه narrated that the Messenger of Allah ﷺ said:”Whoever wants to be seen, Allah will show him, And whoever wants to be heard of, Allah سبحانه و تعالى will make him heard off.” And he narrated that the Messenger of Allah ﷺ said: “He who shows no mercy to the people, Allah سبحانه و تعالىshows him no mercy.” SUNAN TIRMIDHI (Vol. 4, Hadith 2381)
Narrated Jundub رضي الله عنه: The Prophet Muhammad ﷺ said, “He who lets the people hear of his good deeds intentionally, to win their praise, Allah سبحانه و تعالىwill let the people know his real intention (on the Day of Resurrection), and he who does good things in public to show off and win the praise of the people, Allah سبحانه و تعالى will disclose his real intention (and humiliate him). SAHIH AL BUKHARI (Vol. 8, Hadith 506)
The one who wants to stop himself showing off has to do the following things to rid himself of this problem: He should remember that Allah سبحانه و تعالىis always watching His slave. This is the status of “Ihsaan (perfection in worship)
Narrated by Abu Huraira رضي الله عنهthat the man again asked, “O Allah’s Apostle What is Ihsan (i.e. perfection or Benevolence)?” The Prophet Muhammad ﷺ said, “Ihsan is to worship Allah سبحانه و تعالىas if you see Him, and if you do not achieve this state of devotion, then (take it for granted that) Allah سبحانه و تعالى sees you.” SAHIH AL BUKHARI (Vol. 6, Hadith 300), SAHIH AL MUSLIM (Book 1, Hadith 6)
The Muslimwho is sincere in his intention will not pay any attention to the whispers that the Shaytaan tries to impart to him concerning his action, or his suggestion that it is not for the sake of Allah سبحانه و تعالى. He will not pay attention to the whispers of the Shaytaa n suggesting that he should refrain from doing the good deed for fear of showing off. The sincere heart is equally at ease both when doing good deeds in secret and when doing good deeds openly.
Just as the Shaytaan comes to the Muslim to make him admire his actions and show off to people, sometimes too he uses the opposite trick and makes a person think that he is showing off, so that he will not do it. In order to avoid both problems, we have to make sure that our intention is sound and make it sincerely and purely for the sake of Allah سبحانه و تعالى, and not worry after that about anything that the Shaytaan may come up with.
Ibn Qayyim al-Jawzîyah said, "The actions of the heart are the foundation (of belief), and the actions of the limbs follow and complete them. Intention is like the soul, and actions like the body : if the soul leaves the body, the body dies. Therefore, knowledge of the affairs of the heart is more important than knowledge of the affairs of the limbs ... How else is a hypocrite distinguished from a believer except by the deeds of the heart? The worship and submission of the heart is greater than the worship and submission of the limbs, they are more in number, and more continuous, since it (i.e. worship by the heart) is obligatory at every instance." Badua'i' al-Fuwâ'id, vol.3, pp.224 & 330
IBRAAHEEM AL-NAKHA’I رحمت اللهSAID :
If the Shaytaa n comes to you when you are praying and says, “you are showing off,” then you should make it even longer. With regard to the reports narrated from one of the Pious Predecessor, that he stopped worshipping for fear of showing off, this is to be understood as meaning that they felt that they were showing off, so they stopped it. And that is indeed the case. For example, al- A’mash said: I was with Ibraaheem al-Nakha’i when he was reading Qur’aan, and a man asked for permission to enter, so he covered the Mus-haf. He said: So that he will not think that I read it all the time. So if you should not stop doing an act of worship for fear of showing off, it is more appropriate that you should not stop it for fear of self admiration that may occur later on. (AL-ADAAB AL-SHARA’IYYAH, 1/266-267)
Shaykh Ibn ‘Uthaymeen(رحمت الله) was asked: When a person thinks of doing a good deed, the Shaytaan comes and whispers to him: “You want to do that to show off and have a good reputation,” so he backs off from doing that good deed. How can we avoid this?
He replied: That can be avoided by seeking refuge with Allah سبحانه و تعالى from the accursed Shaytaan, and going ahead with the good deed. You should not pay attention to this waswaas (whisper from the Shaytaan) that puts you off doing good. If you turn away from this and seek refuge with Allah سبحانه و تعالى from the accursed Shaytaan, the problem will disappear, by Allah’s leave. (MAJMOO’ FATAAWA AL-SHAYKH IBN ‘UTHAYMEEN, QUESTION NO. 277)
One of the things that will be of benefit in this matter is seeking the help of Allah (Glory be to Him) and calling upon Him.
Narrated by Abu Musa Ashari رضي الله عنه, Prophet Muhammadﷺ said: “O people, beware of this shirk (form of polytheism), for it is more subtle than the footsteps of an ant. The one whom Allah سبحانه و تعالى willed should speak said to him, “How can we beware of it when it is more subtle than the footsteps of an ant, O Messenger of Allah سبحانه و تعالى?” He said, “Say,
"Allahumma inni a`udhu bika an ushrika bika wa ana a`lamu wa astaghfiruka lima la a`lamu"