Intention is the foundation of every action of worship in the Islamic Law. If an action is done without intention or has not a pure intention behind it, it will be invalid. In an authenticated hadith, the Prophet (peace be upon him) said, “ Verily actions are and by intention…” (Al-Bukhari and Muslim)
This means that any action to be accepted is to be accompanied with a pure intention for the sake of Allah. When we talk about an intention, it means what action a worshiper wishes to offer or what he wants to achieve by doing that action. Imam Ibn Rajab (may Allah have mercy upon him) viewed that scholars give two meanings for the intention:
1- Distinguish one act of worship from another. This is like one distinguishes the Zhuhr (Noon) Prayer from `Asr (Afternoon) Prayer or an obligatory act from a voluntary act.
2- Determine the reason behind the performed acts and this is the issue of whether a worshiper is performing the act sincerely for Allah alone.
Then, He (Ibn Rajab) states that in most cases when the Prophet (peace be upon him) and the earliest generation of Muslims talked about intentions, they were concerned about whether or not an act was being done sincerely for Allah alone. (Jami` `Al-`Ulum Wa Al-Hikam)
There is no need to utter the intention verbally, such as saying “I intend to pray Fajr (Dawn) prayer for the sake of Allah”. Imam Ibn Taymiyyah (may Allah have mercy upon him) said, “The intention for offering ablution, prayer, fasting, and other acts of worship does not need to be uttered verbally. This is in accordance with the consensus of the scholars as the Prophet did not utter it and his companions too.”
The place of the intention is the heart as the scholars of have agreed upon. There is no disagreement on this matter except some of the later scholars of the Shafi`i school. Some of the companions of Imam Malik and Ahmad ibn Hanbal said that it is not preferred to utter it, because that is an innovation. It was not narrated that the Messenger of Allah (peace be upon him) or his companions did it or commanded any one to utter the intention. (Al-Fatawa Al-Kubra)
The imam (leader of prayer) should have a firm and sincere intention of offering such-and-such prayer in congregation as an imam. The followers also should have the intention of offering such-and-such prayer with the imam.