Nothing in what the guy is saying suggests that you can write a contract that legalizes something otherwise prohibited.
If you want to write a will, for example, that follows Sharia law and gives the boys everything and gives nothing to the girls unless they marry their buddy's third uncle, then go right ahead.
If you want to cut your brother's hand off because he looked at your wife funny...no.
Wait a second here. Under Sharia law, that sort of thing is allowed :-)
Religious courts are considered a form of arbitration court. For example, rabbinic courts in New York are permitted to arbitrate matters between Jews who have agreed to submit themselves to its decisions (contracts, property distribution in divorces, etc.). HOWEVER, and here’s the significant point, their decisions are still subject to the laws of the State of New York (or whatever state they’re in) and also cannot violate federal laws or the Constitution.
The big difference with sharia is that Islam regards itself as both a religious and political governance system, and therefore does not accept the laws of whatever state or country it is in. Therefore, accepting sharia courts would mean not simply the arbitration of contractual disputes within a religious framework, but the imposition of an entirely different legal system.
I think very few people really understand the difference.