"Homer turns to religion to help him get what he wants, and is soon awarded the church in an injury settlement. Homer then turns the church into his personal party pad, and Reverend Lovejoy leaves Springfield to wallow in its hedonism."

The Simpsons attend a WNBA basketball game, where Homer witnesses Ned Flanders winning $50,000 for making a half-court basket, and then awarded another $100,000 for offering to donate the money to charity. After the game, Ned is allowed to drive home in the Wienermobile because his car is stuck in the parking lot. Homer comes to the conclusion that Ned's life is better than his own and asks Ned for his secret. Ned explains that he works hard and honestly, keeps himself clean, and prays for help. The only lesson Homer takes from the conversation is the prayer might be the secret to success. Later, Homer tries praying to God when he cannot find the remote control. Homer finds the remote, then prays for something to come about on a television show. Having both of his prayers answered instantaneously, Homer is convinced that there is real power in prayer.

Homer continues praying, and all his prayers are answered. Unfortunately, the family soon receives some bad news: their house is falling apart because of bad plumbing. Outside the First Church of Springfield, Homer prays for a solution to their house problems, but falls into a big hole and breaks his leg. A personal injury lawyer appears and convinces Homer to sue the church for damages. The court hearing does not go well for Reverend Lovejoy, and he is ordered to pay Homer $1 million. Since Lovejoy does not have the money, he is ordered to give the church deed to the Simpsons. Homer and his family promptly move in, and Homer decides to throw a big housewarming beer bash. Meanwhile, Marge attends Lovejoy's service at his temporary church inside Barney's Bowlarama. The service is a disaster, so Reverend Lovejoy decides to leave town forever, believing there is no longer a place for him in Springfield.

Homer's housewarming party continues for days, and Marge begins to worry about Homer's mortal soul. Ned Flanders is worried about the whole town, as Homer's partygoers appear to be breaking all of God's commandments. Soon the sky darkens and rain clouds unleash thunder and lightning, leading to an unrelenting downpour. Springfield is quickly flooded, and its citizens are forced to the rooftop of the church. Homer prays to God for the rain to stop, but to no avail. Townspeople on the church roof threaten to tear Homer apart, but he is saved by a voice from above - it is Reverend Lovejoy in a helicopter. He prays to God for mercy, and soon the sun comes out and the waters recede. The Simpsons are unsure whether it was divine intervention that saved everyone, but Homer confesses to learning a lesson about God's anger and mercy.

This article about a Simpsons episode is a stub. You can help Wikisimpsons by embiggening it.