Parshat משפטים is filled with numerous practical laws and the importance of justice. משפט, justice, is the dwelling place of the כסא הכבוד, throne of glory of Hashem.

There is tremendous weight placed on judges. Since the Torah places so much importance on justice, one who perverts it is punished in this world and the next. One who is careful to execute true justice is considered a partner with Hashem.

Mishpat brings Shalom to the world. This is the reason that משפט was primarily handed over to the חכמים, the Sages.

The connection is that משפט  increases peace in the world just as תלמידי חכמים are increasing Shalom in the world.

A world without laws of justice brings chaos. The laws of our Torah being peace.