"Treehouse of Horror V" is the sixth episode of The Simpsons' sixth season and the fifth episode in the Treehouse of Horror series. It premiered on October 30, 1994, and features three short stories called The Shinning, Time and Punishment, and Nightmare Cafeteria. The episode was directed by Jim Reardon and written by Greg Daniels, Dan McGrath, David Cohen and Bob Kushell.
In The Shinning, the Simpsons become caretakers at Mr. Burns' mansion. Deprived of television and beer, Homer becomes insane and tries to murder the family; after finding a television, he returns to normal. In Time and Punishment, Homer repeatedly travels back in time and alters the future; upon failing to restore the future, he settles for a reality close to his own. In Nightmare Cafeteria, Principal Skinner begins using students in detention as cafeteria food; when Bart and Lisa are about to be slaughtered, Bart realizes it is a dream.
David Mirkin deliberately placed more graphic violence in the episode due to complaints about excessive violence in the show. The episode features James Earl Jones as the voice of an alternate universe Maggie, and a recurring joke where Groundskeeper Willie is stabbed in his back with an axe. The episode is generally considered one of the best of the Treehouse of Horror series and of the sixth season.
While trying to fix a broken toaster (which he broke himself after he somehow got his hand stuck in it twice), Homer accidentally turns it into a time machine. It transports him to prehistoric times. He realizes that if he affects anything in the past, he could cause changes in the future. He kills a mosquito before returning to the present. He finds Ned Flanders is now a world dictator, who is performing lobotomies on everyone in the world. Homer travels back in time again to try to set things right. However, he accidentally kills a fish in the past, and after returning to the present he finds Bart and Lisa are giants. He then infects the dinosaurs with a cold virus and wipes them out. He is initially pleased with the results in the present; Bart is polite, the family is wealthy and Patty and Selma are dead. However, he is horrified to find that Marge does not know what a doughnut is (even though it rains doughnuts after he flees back into the past). After several more trips back and forth in time, Homer eventually arrives in a reality that appears normal at first. But he soon finds that humans eat with frog-like prehensile tongues. Homer decides that this is close enough to his own reality.
This episode marks the end of the tradition of using humorous tombstones in the title sequence of Halloween episodes. This sequence contained a tombstone that reads "Amusing Tombstones", which was the writers' way of showing that they were tired of coming up with ideas for humorous tombstone messages. Similar sequences had been used as introductions in all four previous Treehouse of Horror episodes, but have not been used since this episode.
The staff also decided against continuing the tradition of using wraparound segments that were used before each story in the previous Treehouse of Horror episodes, to make more time for the main stories.
The first segment, The Shinning, was inspired by the film The Shining, and is basically a parody of that film. The film's director, Stanley Kubrick, had been a big influence on him and "one of the main reason [he] wanted to be a director". Ironically, series creator Matt Groening admitted that he had not seen The Shining and most of the references to the film were entirely lost on him.
Matt Groening originally pitched the idea that Homer would travel through time in Time and Punishment. His original idea was that the time-travel would be the result of Homer simply jamming his hand in the toaster, but the other writers rejected that. They also wrote scenes where Homer is in the past were written so that he is there for the time it takes for a piece of bread to be toasted. Mirkin gave Peabody and Sherman a cameo appearances in this segment, which was due to the show Rocky and His Friends being a major influence on The Simpsons.
The first time Homer travels back in time, he was originally supposed to state "I'm the first non-fictional character to travel backwards through time". The line was later changed from "non-fictional" to "non-Brazilian". Groening was confused as to the reason for the change, since he liked the original so much. In fact, he didn't even understand what the new line meant.
In the scene where the Simpson's house changes into various different things, one of the original designs was the house made entirely of squirrels. The layout artist who designed it worked on the drawings for more than two days, but ultimately it was cut. To make sure their work did not go to waste, some staff members have used the drawings on Christmas cards and other studio-related notices.
In another deleted scene involving an alternate Simpsons future, the Simpsons had a teenage son named Roy. Groening said that "somebody from outside the show" originally suggested the idea. The joke was later used as a sub-plot for the episode "The Itchy & Scratchy & Poochie Show", although Roy was a lodger in that episode, rather than a son.
Nightmare Cafeteria was the first Simpsons story to be written by David X. Cohen. He wrote the final scene where a nightmarish fog turns the family "inside out". This was inspired by a thriller featured on the radio show Lights Out called The Dark, which scared Cohen as a child. A dance number was added immediately afterwards in order to end the show on a lighter note. He also cut two scenes from this segment feature Sherri and Terri being cooked as "Teriyaki" steak with "Sherry" sauce and Homer regaling Lisa about his dream of eating Milhouse. Nevertheless, a book from this scene was used in this segment. As a result of this scene being cut, Homer does not appear in the third segment, something Cohen believed to be unprecedented at the time. The "grade F meat" joke was written by Mirkin's, inspired by his cousin once seeing a box of hot dogs labeled "grade C, approved for human consumption".
The title of the second segment Time and Punishment is reference to the novel Crime and Punishment and part of the plot, where Homer causes major changes in the future by killing animals in the past, is a parody of the Ray Bradbury short story A Sound of Thunder. Peabody and Sherman from the animated series The Rocky and Bullwinkle Show, make an appearance during Homer's time traveling sequence. The dinosaur scenes are reminiscent of Jurassic Park, and the floor morphing into a television screen is a reference to similar scenes in both Terminator 2 and Time Bandits.
The title of the third segment Nightmare Cafeteria, is a reference to the television series Nightmare Cafe. The plot of using students as food to solve the problem of over-crowded detention comes from the film Soylent Green. The song sung over the end credits is based on the song One from the musical A Chorus Line.
The Shinning segment is particularity highly praised. As well as Entertainment Weekly's praise, IGN voted it first on their list of the best segments in the Treehouse of Horror series, with Time and Punishment coming fourth. It came ninth on the blog Noise to Signal's, list of "The Ten Best Treehouse of Horror Vignettes". Adam Finley of TV Squad contemplating that it "could [...] be the best Treehouse of Horror segment ever" as well as praising the opening of Time and Punishment. When putting together the perfect Treehouse of Horror episode, Michael Passman of Michigan Daily included The Shinning as "a shoo-in". Empire named "No TV And No Beer Make Homer Go Crazy" the sixth best film parody in the show's history.
Alf Clausen's musical score for this episode received an Emmy Award nomination for "Outstanding Dramatic Underscore - Series" in 1995. The authors of the book I Can't Believe It's a Bigger and Better Updated Unofficial Simpsons Guide, Warren Martyn and Adrian Wood called it "Another fine entry to the Treehouse canon".
James Earl Jones's guest appearance in this episode, as well as in "Treehouse of Horror" and "Das Bus", was listed seventh on IGN's "Top 25 Simpsons Guest Appearances" list. Matt Groening said that this line is among his favorite lines in the show. David Mirkin said that Homer's line "Oh I wish, I wish I hadn't killed that fish" is one of favorites in the show, and that the alternate future in which the family are rich "breaks [his] heart every time". Homer's line "close enough" from "Time and Punishment" was later used in the Stargate SG-1 episode "Moebius".