"Treehouse of Horror XVIII" is the fifth episode of season 19, and was the eighteenth Halloween episode.
This is one of several Simpsons episodes which are considered anthology episodes that features mini-stories.
E.T., Go Home - Bart discovers Kodos hiding in the Simpsons' backyard, where Kodos tells him and Lisa he needs some equipment to contact someone to pick him up, but in reality he's setting Earth up for an invasion.
Mr. & Mrs. Simpson - Homer and Marge as Mr. and Mrs. Smith, killers for hire.
Heck House - when Bart, Nelson, Milhouse, and (begrudgingly) Lisa play too many pranks on Halloween, Ned asks for God's help to have the church's "heck house" scare some sense into them, and God obliges...a little too well, as far as the kids are concerned.
In the opening sequence, Marge is making the Simpson family's desserts (cupcakes with chocolate icing in the shape of a jack-o-lantern face). She starts talking to the audience and explains how Halloween was last week, but at the Simpsons house they're still celebrating it and then various logos pop up on the screen for Fox shows, including the mini logos for American Idol, Fox Sports, Prison Break, Cops, House, and 24. Marge ends up killing several miniature characters that pop up from the logos (so that everyone can "watch" the show they are watching?) and bakes them into bread, which she serves to her family. Then when she cuts it, the other characters's body parts are shown to spell out the titles and opening credits, and Homer says, "'Mmm... developed by.'"
E.T., Go Home
In a parody of E.T. the Extra-Terrestrial, Marge tells Bart to get butane from the shed in the garden and as he does so, he finds Kodos there. Kodos (explicitly referred to as male in this episode) states his desire to return home and that he had come to Earth in peace, though he hints that he was really sent there to destroy mankind. Bart, however, is oblivious to this, and agrees to help him get back home. Lisa arrives and is happy with the alien in their home and plans to help Bart and Kodos obtain devices that he can use to contact his home planet, though this appears to be part of his diabolical plan. It does not take Homer long to realize that Bart and Lisa keeping an alien in the house, but he and Marge agree to let them help Kodos anyway after Kodos accuses them of not letting him stay because he is Jewish. Then when NASA agents arrive at the Simpsons home, the family distracts them while Bart sneaks Kodos out. However, when Kodos kills several agents along the way, Bart begins to think Kodos' intentions are not as friendly as he was led to believe. Finally, Kodos reveals that the devices he had the Simpsons collect were for a portal-generating device- so that others of his planet can come to Earth and wipe out the human race.
However when the aliens invade, a brief war is waged, though this time Earth has the upper hand. Later when Bart is given the option to board a helicopter and shoot Kodos, Bart inexplicably plans to spare his life, though Homer shoots him instead. In the end, Earth emerges victorious and the world is saved. The Simpsons are invited to see Kodos's dissection, where they reflect that since Kodos was an evil-looking alien who turned out to be bad, it must be good to judge a book by its cover. Kodos then points out that since he is still alive, it is called vivisection. He is then smothered by Homer with a pillow.
Mr. & Mrs. Simpson
In a parody of Mr. & Mrs. Smith, Homer and Marge appear to be attending marriage counseling and recount a brief moment of tension between them. In the flashback, when arriving home, Homer locks himself in the bathroom and communicates on a hidden flat screen television, where it is revealed Homer is an assassin assigned to eliminate news reporter, Kent Brockman, by order of Homer's employer, Mr. Burns. Before he leaves, he tells Marge he will be coming home late and makes up a crazy excuse; Marge also states that she is busy and makes up an equally far fetched excuse. When Homer prepares to shoot Brockman at his rooftop party from a faraway platform, a woman with large blond hair (who Homer dubs "the Mystery Skank") however, stabs Brockman in the chest, killing him instead. After Homer attempts to repeatedly shoot the woman (ending up with several civilian deaths), he manages to shoot the wig off her head, revealing Marge, also an assassin. Arriving home, the two avoid each other's eyes, and Marge makes an excuse for the blond wig. Not long after, the two attempt to kill one another with various weapons such as grenades, rifles, and a minigun, all the while arguing why the other was an assassin and end up killing Grampa. Bart and Lisa wake up but later leave. But when they're gone Homer almost kills Marge with a crossbow and when Chief Wiggum enters the destroyed house. Wiggum complains about all the noise and that the neighbors are mad about all the noise, Marge becomes furious and shoots Chief Wiggum with the crossbow. Chief Wiggum answers sadly "I would have taken a bribe!" then falls to the floor.
After killing Chief Wiggum with a crossbow, the two realize they are more attracted to one another when they kill someone together. Thus, they soon begin having sex over Chief Wiggum's dead body. Returning to the episode's beginning, Marge and Homer realize that they do not need any marriage counseling, but to kill people together. Later in the end, it turns out that they were not talking to a marriage counselor, but to Principal Skinner regarding about Bart's misbehavior on the school bus. Both Homer and Marge turn a blind eye to Bart's misbehavior and simultaneously shoot Skinner instead.
In a parody of Seven, Bart dressed as Frankenstein, Lisa dressed as a witch, Milhouse dressed as an astronaut and Nelson dressed as a hobo, become frustrated by some of the locals, who refuse to give them candy, on Halloween night. Deciding to honor the true meaning of "trick-or-treat", they begin to pull pranks on everyone, although Lisa barely plays pranks. Soon, however, their pranks turn into vandalism and everyone begins to complain. Ned Flanders then offers his services to teach them a lesson and fashions the church into a "heck house". This attracts their attention and they decide to give it a try. Ned tries to simulate what could happen to them for their sins through the use of crude roleplaying, but they scoff at his attempts. Ned then turns to God to give him the power to scare them straight and subsequently transforms into the Devil, sending all the children to Hell. There, he brings up an enormous crystal ball revealing Springfield to be full of the Seven Deadly Sins, and shows them simulations of how they may suffer; the first clip shows Homer suffering through Gluttony, where he transforms into pasta; the second clip shows Groundskeeper Willie beating up his tractor in Wrath, only for his tractor to transform and cut his head off; the third clip has Doctor Hibbert with a bumper sticker that brags about his son in Pride, where he becomes crushed in between his car and a van; the fourth clip has Homer suffering Sloth, where he is chopped up by a hammock, despite the fact that he had been killed already "by that magic spaghetti"; Lust, Greed, and Envy had Moe in lust for a stripper, greed for all her money, and envy "for the crotchless". The kids declare their lesson was learned, and Ned returns them back to the surface, reverting back into his original form. And the episode finishes with Ned Flanders telling the viewers that they will be going to Hell for watching Fox Broadcasting Company and its affiliates FX Fox Sports and reading the Wall Street Journal, which he welcomes them to the club.
Behind the Laughter
The episode was tuned into 11.7 million homes and a 5.7 overnight Nielsen Rating in addition to a 13 percent audience share, making it the highest rated episode of the season. Combined with a new episode of Family Guy, it tied for first in the 8:00 PM hour with the NFL Pregame show on NBC. Despite this, the FOX Network finished the night fourth overall in ratings.
Robert Canning of IGN called the opening segment, E.T. Go Home, "the weakest segment because it just wasn't really all that funny", and thought the end of the segment was the weakest part of the episode, writing "watching the military decimate the aliens and then seeing Homer use a pillow to put Kodos to sleep, this end was really off-putting. The deaths weren't funny, just uncomfortable." Canning, however, described the final two segments, as well as the opening as being solid segments. He gave the overall episode a rating of 7.4/10.