Allah says, “So whoever hopes for the Meeting with his Lord, let him work righteousness and associate none as a partner in the worship of his Lord.” [Al-Kahf:110]
Ibn al-Qayyim commented, “The righteous deed is the only one that receives acceptance from Allah. That deed must fulfill two conditions:
1- It must be consistent with the Sunnah of the Prophet (peace be upon him).
2- It must be devoted to Allah solely.
A person must have knowledge in order for him to perform such deed with its integral conditions. The intention solely is insufficient if it lacks knowledge of the Sunnah of the Prophet [peace be upon him] as well as determination solely is insufficient if it lacks knowledge of Allah . Therefore, an action devoid of knowledge is invalid; knowledge is the authentic token for sincerity and consistency with the Sunnah.”
Source: Muftah dar al-Sa’adah: 88-89.
Translated by: Abdullah Ibrahim Omran al-Misri.