Is the teacher's seeking of fame and reputation through his work, and the giver of charity's seeking of the needy person's love through his charity, considered shirk (polytheism) or riyaa' (ostentation), if the work or charity is fundamentally for the sake of Allah?
Censurable ostentation (riya') pertains to pure acts of worship, such as prayer. As for permissible matters that transform into acts of worship through intention, like seeking sustenance and worldly knowledge (such as physics and engineering), ostentation does not enter into them. It is permissible for a person to intend, by learning worldly sciences, to earn a living. If they intended to benefit Muslims, that would be better for them.
As for helping the needy for the sake of Allah, while intending to gain their love and affection, this is neither forbidden nor polytheism (shirk). It is a gift, not a charity. Charity is that in which the intention for the Hereafter is pure, whereas a gift is that by which honor, affection, and recompense are intended. Giving (charity, gifts, and grants) is commendable if intended for the sake of Allah Almighty. There is no good in what is intended for ostentation or reputation, and it is disliked if intended for boasting, ostentation, and reputation.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/137619