The great Sufi Mujaddid, Shaykh Ahmad al-Sirhindi (died 1034 H/1624 CE) writes:

On the Day of Judgement we shall be questioned about the Sharī‘ah, not taṣawwuf [Sufism]. Entrance into Paradise and deliverance from Hell depends upon obedience to the Sharī‘ah. Prophets who are the best of creation, preach the Sharī‘ah, and make salvation conditional upon its observance.

The purpose of sending the prophets is to preach the Sharī‘ah. Hence the greatest virtue lies in preaching the Sharī‘ah and in reviving its provisions that have been neglected, particularly at a time when its rites and symbols (sha‘ā’ir) are in ruin. At such a time to spend millions in the way of Allah is not equal to reviving a single rule of the Sharī‘ah. For in doing it one does the work of the prophets, and participates in their mission. They are the best of creation, and the greatest honour is reserved for them; even though others can spend hundreds of millions (in Allah’s way).

Moreover, when you practise the Sharī‘ah you conquer the self, for the Sharī‘ah is designed to subdue the self. In spending money, on the other hand, the self at times feels gratified. To be sure, the money which is spent on strengthening the rule of the Sharī‘ah or preaching religion is a high-order virtue; to spend a penny in this cause is equal to spending millions in other ways.

[Maktubāt, Vol. I:48. English translation by Muhammad Abdul Haq Ansari in Sufism and Shari‘ah, Islamic Foundation, Leicester, 1986, pp. 228-229]