The Shari`ah is of fundamental importance to the Sufi path. This point is very strongly made by the great Naqshbandi Sufi, Shaykh Ahmad Sirhindi (also known as Imam ar-Rabbani), in his letters. Here is a small excerpt from one of his letters, where he clarifies this topic:
The Shari`ah has three parts: knowledge, action, and sincerity of motive (ikhlas); unless you fulfil the demands of all these parts, you do not obey the Shari`ah. And when you obey the Shari`ah you obtain the pleasure of God, which is the most supreme good in this world and the Hereafter. The Qur'an says: "The pleasure of God is the highest good." Hence, the Shari`ah comprehends all the good of this world and the next, and nothing is left out for which one has to go beyond the Shari`ah.[Quoted from "Sufism and Shari`ah: A study of Shaykh Ahmad Sirhindi's Effort to Reform Sufism," by Muhammad Abdul Haq Ansari, pp. 221-2. Originally from Shaykh Ahmad Sirhindi's letters, Vol. I:36.]
For those who may not have heard of Shaykh Ahmad Sirhindi, he lived in India in about the 16th Century, and he reinvigorated and repurified Islam in India, after the highly destructive anti-Islamic policies of the Moghul ruler Akbar. Most of the Naqshbandi lineages today stem from Shaykh Ahmad Sirhindi -- this is an indication of his great influence. I think there is a strong parallel between Shaykh Ahmad Sirhindi's time and the world today, and so I think we can learn very much from this great Shaykh's life and writings.
The Shari`ah is of fundamental importance to Tasawwuf. Therefore, if someone calls himself a "Shaykh," yet does not practice the Shari`ah, all Muslims should avoid following him, and prefer to follow a Shaykh who does teach and practice Shari`ah.