The simple answer is not to put them there in the first place!!!
Here's how to keep those pets in line:
New pets drop onto the screen into voids left when pets leave the bottom of the screen, or when no boxes exist. So plan your moves to avoid creating space at the sides of the screen. To achieve this, don't ever click on the blocks in the screen's three left or right columns.
We found a great example video and included it here.