The dummy is an exact replica of SpongeBob and can be customized to suit his needs. The dummy seen in the later scene is dressed up to be long, tan, and handsome like Octavius Rex, according to SpongeBob when it was taking Pearl to the prom.
Role in episode
It first appears in the Krusty Krab in one of the first scenes of the episode. SpongeBob uses it after Pearl destroys most of the restaurant.
It then appears dating Pearl at the prom and in the final scene it is seen standing outside of Mr. Krabs' house, returning Pearl home to Mr. Krabs.