Everything you need to know about director Gary Rucker’s buoyantly silly production of “Shrek the Musical,” which opened last Friday on The Rivertown Theatre’s mainstage, can be found in an early second-act number.

Having successfully rescued Princess Fiona from a tower guarded by a fire-breathing dragon, every child’s favorite ogre begins the second leg of his journey to return Fiona to the diminutive Prince Farquaad. On the road to the prince’s castle, the curmudgeonly Shrek discovers clashing personalities can be as difficult as any fairytale monster.

Having essentially frayed each other’s nerves, Shrek and Fiona square off in the song “I Think I Got You Beat” that puts their miserable childhoods into conflict with one another.

Escalating into a growing litany of woes that includes a Christmas Night abandonment, the tension between the two characters gives way to sparks and finally moves into a romantic syncopation.

And by “a romantic syncopation,” I mean a belching and farting competition.

With Kelly Fouchi and Kevin Murphy as the budding lovebirds, the routine becomes a hysterically gross unraveling of all traditional models of courtships, and their dueling buttock bassoons will delight the 8-year-old in any and all that attend.

Showing off her own crackerjack comic timing and choreographer Karen Hebert’s expertly dorky dance moves, Fouchi juts her bottom, shakes her chest, and executes every possible un-ladylike pose in her attempt to outdo the wiseacre, sad sack ogre at breaking wind.

Murphy, who wisely underplays in the early going, lets it rip in this sequence. Using a boom of a voice and a deep sighing slow burn, he allows Fouchi’s manic one-upsmanship to pull him into the growing cacophony.

But it’s more than just a case of blazing saddles.

Their farting is funny, but their arc is a mad sort of brilliant. Because not only does Fiona discover the green man passes gas with the best of them, but he also passes the muster as a suitor.

Somehow, they manage to take each other’s breath away in both meanings of the phrase.

And that sweet crudity is the core reason for the success of Rivertown’s opening show of the season.

The material itself isn’t flawless. David Lindsey-Abaire’s book is a little too long, Jeanine Tesori’s score goes a song too far, and the twisted energy doesn’t rise to the level of the theater’s recent “Young Frankenstein.” However, as family entertainment goes, it doesn’t pander, has an energetic supporting cast, and boasts Rivertown’s always-sharp technical polish.

And wait until you see and hear The Dragon.

Built by Kenneth Thompson and sung marvelously by a sultry Cherelle Palmer, the massive, cartoonish beast becomes a symbol of sorts for the wonderfully committed work Rucker has wrung from his creative and performance team.

Whether its Linda Fried’s carefully selected and built costumes, Eric Porter’s seamless combination of Broadway and original design elements or Scott Sauber’s cinematic lighting design, the whole production is a unified world of make-believe, magic and whoopee cushion sensibilities.

For parents hoping to enjoy with their children the same sort of fun-for-all-ages the movie captured, they can rest assured all those elements are still in place and personified in every role.

Shrek’s faithful sidekick Donkey still beams and charms his way through the proceedings with actor Jermaine Keelen capturing the character’s necessary sweetness.

Of course, his laughs come in all the right places, but it’s the talking animal’s inherent decency that stays with you.

Mason Wood’s Lilliputian Farquaad is the rival of his earlier performance as the physically challenged Igor in “Frankenstein.” In songs like “Welcome to Duloc,” Mason walks the fine line between winking self-awareness and dastardly villain. He does honor to John Lithgow’s supercilious creation while crafting something uniquely his own.

There are not enough words to cover the contributions of the 30-plus cast that includes Pinocchio, the Three Little Pigs, a Wicked Witch, a Big Bad Wolf and backflipping dwarves, but suffice it to say, each and everyone gives care and detail that matches the work done by the designers in making them a visual reality.

To paraphrase its titular hero, it will more than do.