Ismailis theorized the sharī‘a as an ethical, legal, and ritual regime that the Prophet Muhammad and prior Prophets constructed and composed through divine inspiration in response to the circumstances of their own time as opposed to something that God directly ordained and dictated eternally. In other words, the Lawgiver is the Prophet. This sharī‘a constitutes the outward or exoteric (ẓāhir) and symbolic dimension of religion, whose ultimate content and symbolic referent is the inner or esoteric (bāṭin) dimension of religion. The esoteric holds greater truth value than the exoteric and grounds the spiritual value and efficacy of the latter. Following the Prophet, the Imams remain as divinely-inspired guardians of the sharī‘a; they interpret and evolve it based on the needs of the time and disclose its inner symbolic meaning to the community. In this theorization, medieval Ismaili thinkers also divided the sharī‘a into two parts – the “rational” (‘aqlī) sharī‘a whose contents serve the wellbeing of human society and the “imposed” (waḍ‘ī) sharī‘a whose value lies its symbolic and esoteric meaning. Most importantly, they all believed that the “imposed” (waḍ‘ī) sharī‘a would be abrogated by the Imam at the commencement of the eschatological age of qiyāma (resurrection), which refers to a highly anticipated future period of spiritual unveiling (kashf) in human history. In all of these respects, the Ismaili positions entail the contingency of the sharī‘a.
Ismaili theorization of the sharī‘a has played out over Ismaili history in at least three different ways, often driven by theological developments and the socio-political context of the community: in the pre-Fatimid period (148/765-297/909) and early Fatimid era (297/909-354/965), the Ismailis affirmed the sharī‘a and enacted it through establishing a number token Shi‘ī legal practices in Fatimid domains without actually having a formal Ismaili fiqh; in the later Fatimid era (354/965-487/1094) and early Alamut period (487/1094-559/1164), the Ismailis affirmed the necessity of the sharī‘a and practiced it through a formal and pragmatic Ismaili fiqh (jurisprudence) formulated by al-Qāḍī al-Nu‘mān (d. 363/974) under the direction of the Fatimid Ismaili Imam-Caliphs; in this period, the Ismaili fiqh served as a vehicle of advancing Ismaili truth-claims against Sunni theories of law. From 559/1164 to 607/1211 in the Alamut period, Nizari Ismailis at the communal level ceased practicing parts of the sharī‘a when the Nizari Ismaili Imam Ḥasan ‘alā dhikrihi al-salām declared qiyāma in 559/1164 and guided the Ismailis to practice Islam in a more spiritual manner. In the latter phase of the Alamut period (607/1211-654/1256) and the post-Alamut period (645/1256 onward), the Ismailis dissimulated as Sunnis and observed the sharī‘a communally as a form of taqiyya to protect themselves from persecution within predominantly Sunni and Twelver societies; however, at the individual level, an Ismaili could dispense with certain sharī‘a ritual practices if one had reached the higher spiritual stations of ṭarīqa and ḥaqīqa and it was safe to do so; this orientation seems to share certain ideas with Sufi thought.
Finally, in the modern period, the Ismailis communally do not observe most of the ritual sharī‘a and instead define their interpretation and practice of Islam in Sufi terms as the “Ismaili ṭarīqa of Islam”. This is due to the religious reforms of the forty-eighth Ismaili Imam Aga Khan III (d. 1957), who discontinued the community’s practice of many sharī‘a rituals in the early twentieth century. This modern Ismaili orientation embodies recent Ismaili Imams’ efforts to consolidate their authority over a globalized community and construct a unified Ismaili identity amidst its cultural and geographical diversity. At the same time, the modern Ismaili community participates in structures and priorities established by Aga Khan IV which, it may be argued, amount to a contemporary Ismaili conception of sharī‘a: these include the Ismaili Constitution, which contains rules and regulations for the social governance of the Ismaili community; verbal guidance given by the Aga Khans, called farmāns, which stress the ethical principles of Islam and the regularity of religious practice; and the Aga Khan Development Network, a group of international development agencies, whose activities are rooted in the ethics of Islam oriented around the principle of “quality of life”. These modern Ismaili initiatives express principles that coincide with what some Sunni jurists call the maqāṣid al-sharī‘a rooted in the principle of maṣlaḥa and what medieval Ismaili thinkers termed the “rational sharī‘a”.