Ibn 'Umar said: Allah's Apostle said: Islam is based on (the following) five (principles):
1. To testify that none has the right to be worshiped but Allah and Muhammad is Allah's Apostle.
2. To offer the (compulsory congregational) prayers dutifully and perfectly.
3. To pay Zakat. (i.e. obligatory charity)
4. To perform Hajj. (i.e. Pilgrimage to Mecca)
5. To observe fast during the month of Ramadan.
'Umar bin Al-Khattab said: I heard Allah's Apostle saying, "The reward of deeds depends upon the intentions and every person will get the reward according to what he has intended. So whoever emigrated for worldly benefits or for a woman to marry, his emigration was for what he emigrated for."