Fiqh is the legal science and can sometimes be used synonymously with Shariah. The two are, however, different in that Shariah is closely identified with divine revelation (wahy), the knowledge of which could only be obtained from the Quran and Sunnah. Fiqh has, on the other hand, been largely developed by jurists and consists of rules which are mainly founded on human reasoning and ijtihad. Shariah is thus the wider circle, and it embraces in its orbit all human actions, whereas fiqh is narrower in scope and addresses mainly what is referred to as practical legal rules (al-ahkam al-amaliyah). The path of Shariah is laid down by God and His Messenger; the edifice of fiqh is erected by human endeavour.
Muslim scholars have generally regarded fiqh as understanding of the Shariah, and not the Shariah itself; a certain distinction between them had thus existed from the formative stages of fiqh. Note, for example, that the leading schools of law that were developed in the first three centuries were all known as the schools of fiqh. They were not known by any such terms as the Hanafi Shariah, or Shafii Shariah but consistently as Hanafi fiqh, Shafii fiqh and so forth. The underlying message was one of unity in reference to Shariah but of diversity with regard to fiqh.
"Shariah Law - An Introduction" - Mohammad Hashim Kamali, pp. 15, 16