At the end of the episode, Plankton is flung across the Reef Cinema by Mr. Krabs and lands on Bubble Bass' palm, who is eating jelly beans. Bubble Bass mistakes Plankton, who is trying to escape, for one and goes after him.
Patrick gets hungry while on the worm-sled race, and after having no more gooey worms left, he decides to eat his bag of jelly beans he brought with him.
When the abominable snow mollusk returns, she becomes intrigued by Patrick's jelly beans. After Plankton returns, the snow mollusk mistakes him for a jelly bean and then proceeds to eat him. As a result, Plankton is left sitting in the mollusk's stomach in a pool of acid with the jelly beans she had consumed, waiting to be digested.
SpongeBob's Frozen Face-Off
They appear as collectibles to unlock alternate endings.
Coincidentally, both of the episodes that jelly beans appear in end with a character mistaking Plankton for one.