That said, judges can't just change it willy-nilly. The Colorado Constitution says our common law is as it existed in England at the time of the settlement of America and as it subsequently developed in America. Judges are very careful to apply the concepts of contract law consistently and fairly because trillions of dollars in transactions and the stability of the economy depend on them. The appellate courts enforce the rules when a trial judge gets it wrong. The idea of a judge adopting Sharia, say, the prohibition on charging interest, is absurd.
That said, we do have freedom of contract. If two people want their contract to be government by certain tenets of Sharia, they are free to do so as long as what they are doing doesn't violate a law or public policy of the state. I've seen contracts where people agree to have any dispute settled by certain Christian tenets.
Also, the extent to which Muslims govern their religious affairs by Sharia is their own business, again so long as no law or policy is violated. The Catholics govern themselves by their canon law. Many Protestant denominations have their own laws and even courts.
People get very exercised about this, but there is no danger of America being governed by Sharia law.
Finally a voice of intelligence in a forest of dumbies on this issue. Thank you.