Choice of law clause
In contract law, a choice of law clause or proper law clause is a term of a contract in which the parties specify that any dispute arising under the contract shall be determined in accordance with the law of a particular jurisdiction. An example is "This Agreement shall be governed by, and construed in accordance with, the law of the State of New York." A choice of law clause may be combined with a forum selection clause. The combined clause would include the choice of law that is to govern any dispute arising under the agreement, and the choice of forum where disputes will be heard. Once implemented, a choice of law clause will generally be upheld by the court, so long as it is bona fide, legal, and not contrary to public policy. Explanation
Choice of law clauses provide certainty about the law to be applied should a contractual dispute arise. As business transactions and contractual obligations may cross jurisdictional borders within a nation, as well as international borders, both physically and electronically, choice of law issues may arise. As laws vary between jurisdictions, it is possible that contract terms could be interpreted differently between jurisdictions, or that portions of a contract that are enforceable in one jurisdiction would not be enforceable under the laws of another. The parties may therefore agree in advance to interpret the contract in accord with the laws of a jurisdiction that is identified within their contract. In determining the choice of law, parties may consider the types of dispute which could arise from their agreement, whether the law will be from a common or civil law jurisdiction, how friendly or hostile a jurisdiction would be to their claim, and whether sufficient precedent exists in that jurisdiction. Parties often seek a jurisdiction that would be neutral to their claims. However, where one party has more bargaining power, they may impose the law of their jurisdiction or choose a more favourable law. In some situations a court may find that there are public policy reasons to disregard a choice of law clause, and instead interpret a contract under the laws of the jurisdiction in which a lawsuit is filed. For example, a jurisdiction may find, as a matter of public policy, it will apply its own consumer protection laws to a dispute between a consumer and a business even if the contract calls for the application of the laws of a different jurisdiction. In Canada 
Parties drafting contracts in Canada may indicate the laws of a specific province, followed by the phrase "and the laws of Canada applicable therein" to ensure that federal law is also applicable. Federal, provincial or territorial stature can inhibit parties' ability to negotiate a choice of law. For example, the Bills of Exchange Act, Canada Shipping Act, and the Insurance Act (Ontario). The Canadian position for autonomy for choice of law negotiations was established in Vita Food Products Inc. v Unus Shipping Co  “the proper law of the contract ‘is the law which parties intended to apply.” For the choice of law clause to be enforceable, the choice of law must be bona fide, the contract must be legal, and there must be no reason for avoiding the choice of law on public policy. In order to be bona fide, the parties must not have intended to use that law in order to evade the legal system that the contract has the most substantial connection with. Where a contract which is illegal, or its performance is illegal, it will not be treated as a legal contract. The contract may also not be contrary to public policy. For example, gambling was once considered contrary to public policy, so foreign gambling debts would not be enforced in Canada. Courts may also refuse to enforce choice of law or forum selection clauses in consumer contracts where the plaintiff demonstrates strong cause that it should not be enforced, including demonstrating an inequality in bargaining power. In Canada, whether the term "submit" or "attorn" is used may determine whether the choice of law clause is enforced. In Naccarato v Brio Beverages Inc. a Court of Queen's Bench in Alberta found that the term "submit" indicated that the clause was permissive, giving the Court concurrent jurisdiction to hear the matter. In Forbes Energy Group Inc. v. Parsian Energy Rad Gas, 2019 ONCA 372, the Ontario Court of Appeal held that the clause (“attorn to the courts of England”) meant that the laws of England would apply, but the clause was not sufficient to provide the courts with exclusive jurisdiction. The action was allowed to proceed in Ontario. The term "exclusive" and other mandatory language provides more certainty that another court will not assume concurrent jurisdiction. In the United States 
How choice of law clauses are interpreted may vary by forum. In Delaware, a standard choice of law clause can cover liability arising in either tort or contract in order to avoid uncertainty. In New York, the express language of the provision must be “sufficiently broad” as to encompass the entire relationship between the contracting parties. For example, in Krock v. Lipsay, the United States Court of Appeals for the Second Circuit determined that a generic choice-of-law clause did not cover a claim for fraudulent misrepresentation. References

Further reading
Lea Brilmayer and Jack Goldsmith, Conflicts of Law: Cases and Materials, Fifth Edition (2002), p. 280-303. Stephen G.A Pitel, Private International Law in Common Law Canada: Cases, Text and Materials, Fourth Edition (2016), p. 349-377. See also
Forum selection clause
Arbitration clause
Lex loci arbitri

Contract law
Conflict of laws
Contract clauses