This episode is from December 10, 1966. The first Star Trek episode was aired on September 8, 1966. Also in this episode was Liam Sullivan who appeared on Star Trek in season 3 episode "Plato's Stepchildren," and Anna Karen, who appeared in the season 3 episode "All Our Yeserdays."
Besides the Star Trek connection, this episode also features Western legend Ben Johnson as a villain, along with career thugs Tom Reese and Timothy Carey. They join the episode towards the end, when they attack the Quaker town, looking for Shatner and his money. They beat up some Quakers and vandalize the village. Eventually they pick the wrong guy to torture (Ewing) in order to locate the cash. The Quakers were convinced Thad was the evil killer, because Shatner was so charming and so nice.
The quirky acting of William Shatner is the real star. He kills a sheriff, has a large amount of stolen money hidden, he alternates between being evil, being kind to everyone, and laughing at Roger Ewing like he is crazy. The Quakers find Shatner & Ewing in bad shape, and Shatner persuades them that Ewing is the bad guy.
This was done on Gunsmoke before, when Matt Dillon and Robert Wilke are found unconscious by a nester family, and Wilke persudes them he is the Marshal (season 9 "The Bassops").
In this version Roger Ewing is the deputy, and besides having no personality, Shatner steals every scene with Ewing. Shatner's talent blows everyone away. When Shatner is laughing, being a nice guy, getting angry, threatening Ewing, etc., Ewing just stands there with his mouth open, like he is thinking "that was not in the script I read." The truth is that Shatner puts so much pizzazz into his role that it really makes an average Gunsmoke story very memorable.
This episode really highlights that Shatner could really improvise his acting, and turn his character on a dime. I had seen this before on Star Trek, but seeing him evolve a standard Gunsmoke villain into a complicated, devious, somehwhat insane character was impressive.
As I watched this episode recently, and saw Shatner alternating from good guy to villain, it occurred to me that he could have been a good Joker, as a villain for Batman. While Cesar Romero made the role famous on the Batman TV series, I think Shatner could have been a classic version of the Joker character. His acting was inspired.