In the midst of all of that, we too often forget what friendship means to our religious goals. In the same way a friend can remind you about a test, they can remind you about an opportunity to seek reward from Allah (SWT). Perhaps more importantly, simply associating with someone that is upon the path of Allah in itself commands reward.
In the Islamic tradition, we understand that friendship plays an especially pivotal role; the Prophet Muhammad (pbuh) is perhaps best understood in the relationships he had with his sahaba or companions. The hadith of the Messenger (pbuh), which Muslims understand to be divinely-inspired guiding principles, often took the form of friendly advice. From the following three hadiths we can derive a few basic lessons about friendship, specifically how to choose, treat, and benefit from their company:
The Messenger of Allah (pbuh) said: “A man is upon the religion of his friend, and there is no good in friendship with one who does not see for you what he sees for himself.” From this, we gain
“Help your brother whether he is a wrong-doer or is wronged. A man enquired: 'O Messenger of Allah (pbuh), I may help him when he is wronged, but how can I help him when he is a wrong-doer? ' The Prophet (pbuh) said 'You can prevent him from wrong-doing. That will be your help to him.’”
“A good and a bad companion are like the bearer of musk and the one who pumps out filth respectively. As for the bearer of musk, he will either give you a share, you will smell perfumed air, or you will purchase something from him as for one who pumps out filth, he will either burn your clothes or you will smell something filthy from him.”