A show trial is one in which the outcome has already been decided, meaning that the trial itself is merely carried out "for show", either to feign legitimacy, or intimidate others, or both.

Another phrase that might be relevant in some cases is witch hunt. Originally this literally meant to search for witches, i.e. people who engaged in witchcraft. Those accused would be put on trial in what was essentially a kangaroo court. In modern usage, the phrase has come to be used metaphorically for any similar biased proceedings, such as those of McCarthyism.


The original kangaroo court was the Star Chamber in particular under the Tudors and Stuarts.

In modern usage, legal or administrative bodies with strict, arbitrary rulings and secretive proceedings are sometimes called, metaphorically or poetically, star chambers. This is a pejorative term and intended to cast doubt on the legitimacy of the proceedings. ... the historical abuses of the Star Chamber are considered a primary motivating force behind the protections against compelled self-incrimination embodied in the Fifth Amendment to the United States Constitution.


A couple more general ideas, that meet the single word tag:

The trial was a charade

noun

noun: charade; plural noun: charades

an absurd pretense intended to create a pleasant or respectable appearance.

"talk of unity was nothing more than a charade"

synonyms: farce, pantomime, travesty, mockery, parody, pretense, act, masquerade

"our entire relationship is a charade"

Of the synonyms listed above, I would say calling a trial or court hearing a travesty, pantomime, mockery, or pretense also expresses similar contempt or dubiousness with coming from a slightly different angle.