Faith in Allah is the first requirement for a Muslim. It should be complemented with good deeds and avoidance of evil. Faith without doing good deeds is as insufficient as doing good deeds without faith. The Prophet (S) has said about fasting, which is one of the important pillars of Islam:
If a person does not avoid false talk and false conduct during Siyam (fasting), then Allah does not care if he abstains from food and drink. (Related by Abu Huraira, Bukhari, Muslim).
This hadith clearly implies that although we may fast out of our faith but if we don’t follow it up with other commanded good deeds, then that particular action may not have any use. In the example above, one may fast but the inability to follow it up with certain actions (or abstaining from others) defeats the purpose of that particular worship. (Read further on what nullifies faith).
Ibn Al-Qayyim was quite eloquent about this topic, when he stated the following:
“Faith is the heart and core of Islam, and certainty is the heart and core of faith. Any piece of knowledge or deed that does not make faith and certainty stronger is abnormal, and any faith that does not urge one to perform good deeds is abnormal.” (Al_Fawwaid: By Ibn al-Qayyim p.132)
Allah says in the Quran:
And give glad tidings to those who believe and do righteous good deeds, that for them will be Gardens under which rivers flow (Paradise)….Quran (Surah Al-Baqarah:25)