From the Super Mario Wiki
In The Adventures of Super Mario Bros. 3 episode "Reign Storm", Kooky builds the Robot Princess when the real Princess Toadstool goes on vacation in Hawaii, so that King Koopa can take over the Mushroom Kingdom.
A few days after Princess Toadstool left, Mario and Luigi fail to handle the responsibility of temporarily running the kingdom, as King Koopa and the Koopalings are instigating trouble wherever they can. This causes the subjects of the Mushroom Kingdom into demanding the Mario Brothers recall the Princess from Hawaii. King Koopa and Kooky send the Robot Princess to Mario and Luigi, who fail to notice the impostor and are instead overjoyed to have the Princess reclaim her leadership role. Having complete control over all the decisions made in the Mushroom Kingdom, the Robot Princess makes several crazy demands, including ordering a new highway to be built out of quicksand, and getting the Mushroom Kingdom Fire Department to extinguish all the Fire Flowers in the kingdom.
When Mario and Luigi pay the Robot Princess a visit, they find her planning on giving the Mushroom Kingdom over to King Koopa, and she demands them to leave. It nearly succeeds in crowning him as the new ruler of the Mushroom Kingdom, but the real Princess Toadstool shows up to reclaim her crown. Kooky crashes into the impostor right after as he comes in to warn his family about the real princess. They escape, leaving the destroyed robot behind.