The first word uttered in “Sausage Party” is a popular synonym for excrement, which is a bit counterintuitive. In a movie about food, you’d expect that to come at the end. But while the next 88 minutes supply plenty of scatology — including a blessedly discreet toilet-paper joke — this potty-mouthed movie has higher matters in mind. You will come for the kind of humor promised in the title and the well-earned R rating, but stay for the nuanced meditations on theology and faith.

The opening barrage of profanity serves as a tactical warning to parents who might have wandered in with their kids on the assumption that this was a cute little cartoon about the secret lives of groceries. Which it is, actually. But if you do bring the little ones — not that I condone it! — you may have to answer questions not only about what all those veggies and snacks are doing during the extended supermarket orgy scene, but also about the existence of God. In adult company, you might find yourself debating whether the film is a Christopher Hitchens-style atheist polemic or a more pragmatic, William Jamesian exploration of the varieties of religious experience. I won’t spoil that one for you.

In a nutshell — in a brightly colored, economy-size value pack — “Sausage Party” traces the dialectic of enlightenment in the life of a skeptical sausage named Frank. Voiced by Seth Rogen in his usual growly, loud-Canadian manner, Frank starts out as a true believer. At the beginning of every day, the groceries sing a hymn (by Alan Menken) praising “the gods” who will escort the chosen foodstuffs into “the great beyond.” Since the Fourth of July is approaching, Frank and his buddies think their turn is coming, which means that Frank and his girlfriend, a comely bun named Brenda (Kristen Wiig), will at last be able to shed their packaging and consummate their relationship.