Imam Sadiq (as) says...
Imam Sadiq (as) says: “Avoiding sins is (a knid of) being grateful for the favours.” And he also said: “Thanking for Allah’s blessing is done once a person regards all blessings as originated from the part of Allah (and not from his own intelligence, wisdom, reasoning and one’s own struggle or that of other people’s), and that he is content with what Allah has given him, and does not use Allah’s blessings as a means of committing sins, he is really thankful to Allah.
Real gratitude consists of the utilization Allah’s blessings for Allah’s ends.” [^1] Thankfulness for the Divine blessings is very tiny and unmentionable.
Some Islamic traditions indicate that Allah revealed to Moses: “Thank Me as it is My due!” Moses answered: “It is an impossible act, for each word of thanks requires another word of thanks.” The revelation came: “Your confession as to the fact that you are aware that whatever exists has its origin in Me, is the best way of thanking Me.” [^2] Incidentally, if we use Allah’s blessings in ways other than the path of Allah, we have practiced the act of ingratitude and paved the ground for disbelief and deserve chastisement.
The verse says: “…and if you be ungrateful, verily My chastisement is indeed severe’.” Several Traditions Concerning Gratitude 1- Amir-ul-Mu’mineen Ali (as) once said: “Continue (the act of) thanksgiving so as your favour becomes continuous.