What Is Shari’ah?
Question

What is Shari’ah?
Praise be to Allah.What is Shari’ah?
The word Shari’ah refers to the entire religion of Islam , which Allah chose for His slaves, to lead them forth from the depths of darkness to the light. It is what He has prescribed for them and explained to them of commands and prohibitions, halal and haram. 
The one who follows the Shari’ah of Allah, regarding as permissible what He has permitted and regarding as prohibited what He has prohibited, will attain triumph. 
The one who goes against the Shari’ah of Allah is exposing himself to Allah’s wrath, anger and punishment.
Allah, may He be exalted, says (interpretation of the meaning):
{Then We put you, [O Muhammad], on an ordained way concerning the matter [of religion]; so follow it and do not follow the inclinations of those who do not know.} [al-Jathiyah 45:18]
Al-Khalil ibn Ahmad (may Allah have mercy on him) said:
“The word Shari’ah (pl. sharai‘) refers to what Allah has prescribed (shara‘a) for people regarding matters of religion, and what He has commanded them to adhere to of prayer, fasting, Hajj and so on. It is the shir‘ah (the place in the river where one may drink).” (Al-‘Ayn (1/253), see also as-Sihah by al-Jawhari (3/1236)
Ibn Hazm (may Allah have mercy on him) said:
“Shari’ah is what Allah, may He be exalted, prescribed (shara‘a) on the lips of His Prophet (blessings and peace of Allah be upon him) with regard to religion, and on the lips of the Prophets (peace be upon them) who came before him. The ruling of the abrogating text is to be regarded as the final ruling.
Linguistic origin of the term Shari’ah
The linguistic origin of the term Shari’ah refers to the place in which a rider is able to come and drink water, and the place in the river where one may drink. Allah, may He be exalted, says (interpretation of the meaning):
{He has ordained [shara‘a] for you of religion what He enjoined upon Noah and that which We have revealed to you, [O Muhammad], and what We enjoined upon Abraham and Moses and Jesus - to establish the religion and not be divided therein. Difficult for those who associate others with Allah is that to which you invite them. Allah chooses for Himself whom He wills and guides to Himself whoever turns back [to Him].} [ash-Shura 42:13]
Can you go against Shari’ah?
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
“Man has no right to go against Shari’ah in any of his affairs; rather everything that is good for him and his well being is referred to in Shari’ah, whether it has to do with his major issues or minor issues, in all his situations and actions, in his interactions and dealings with other people, and so on. Praise be to Allah, Lord of the Worlds. 
The reason for that is that Shari’ah means obedience to Allah and His Messenger, and those in authority among us. Allah, may He be exalted, says (interpretation of the meaning): {O you who have believed, obey Allah and obey the Messenger and those in authority among you} [an-Nisa 4:58]. He has enjoined obedience to Him and obedience to His Messenger in many verses of the Quran, and He has forbidden disobedience to Him and disobedience to His Messenger. He has promised His good pleasure, forgiveness, mercy and Paradise in return for obedience to Him and obedience to His Messenger, and He has warned of the opposite of that in return for disobedience to Him and disobedience to His Messenger. 
Therefore everyone, whether he is a scholar, ruler, devoted worshipper, or individual involved in dealings and transactions with others, must obey Allah and His Messenger in whatever he is doing, whether it is teaching and learning, judging, enjoining what is good or forbidding what is evil, doing any deed, doing an act of worship, or anything else.
The true meaning of Shari’ah is following the messengers and obeying them, but going against Shari’ah means going against obedience to the messengers, and obedience to the messengers is the religion of Allah." (Majmu‘ al-Fatawa 19/309)
The scholars of the Permanent Committee said:
“Shari’ah is that with which Allah sent down His Books and sent His messengers to people, so that they would put it into practice by way of worshipping Allah and seeking to draw close to Him, in accordance with what the messengers (blessings and peace of Allah be upon all of them) enjoined.
The right way to be followed is what is in accordance with this; in other words, what is in accordance with the instructions of Allah Who sent it down to the last of His messengers, Muhammad (blessings and peace of Allah be upon him) as He said ( interpretation of the meaning): {And, [moreover], this is My path, which is straight, so follow it; and do not follow [other] ways, for you will be separated from His way} [al-An‘am 6:153]. And it is what is in accordance with the words of the Prophet (blessings and peace of Allah be upon him): “My ummah will split into seventy-three sects, all of whom will be in the Fire except one.” It was said: Who are they, O Messenger of Allah? He said: “Those who follow the path that I and my Companions follow.” This is included in Shari’ah.
As for the paths (tariqahs) that differ from it, such as the tariqahs of the Sufis, the Tijanis, the Naqshabandis, the Qadiris and so on, these are innovated paths. It is not permissible to accept them or follow them for the purpose of attaining the pleasure of Allah, may He be glorified." (Fatawa al-Lajnah ad-Daimah  2/219)
And Allah knows best.