Hz Mawlana Jalaluddin Rumi (r.a.) explains the relationship between the Shariah (law), the Tariqah (way) and the Haqiqah (Truth/Reality) thus:

The Law is like a lamp: It shows the way. Without a lamp you will not be able to go forward. When you enter the path your going is the Way. And when you reach the goal, that is the Truth.

The Law may be compared to learning the theory of medicine. The Way involves avoiding certain foods and consuming certain remedies on the basis of this theory. Then the Truth is to find everlasting health and to have no need for theory or practice.

When man dies to the life of this world, the Law and the Way will be cut off from him and only the Truth will remain………The law is knowledge, theWay is works and the Truth is attainment to God.

Masnavi BK 5 (Intro)