Sayyiduna Abu Hurayrah (may Allah be pleased with him) states: I heard the Prophet (peace and blessings be upon him) say: "Whoever adorns himself with a deed pertaining to the Hereafter while he does not intend the Hereafter, or does not seek it, is cursed in the heavens and the earths."
Al-Tabarani recorded it in al-Mu'jam al-Awsat; its chain contains a narrator, Isma'il bin Yahya al-Taymi, and he is a kadhdhab (liar).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الزهد / 17648