In my opinion, the only one true and most affective way to stop the selling of animals in petstores is through strong legislation, so strong that it would make it impossible to get animals in a petstore environment to be sold. Otherwise, not purchasing products from a petstore that sells animals is a start. Also public education...start at the roots, Kindergarten, beginning with getting schools to stop displaying classroom pets.
My daughter works at petsmart now, she use to work at petsupplies plus until they made her so unhappy that she had to quit, most of my doing though. My daughter has called me on countless occassions about people who walk into the store to surrender the pets. Most recently was 2 guinea pigs. The manager there was going to put them into the reptile cage until my daughter unleashed her wrath and told him otherwise. She still has her job after that and the manager learned something new that night. Another worker there whose guinea pig at home died a few weeks earlie took them in. I'd like to start a rescue in a few years once I can cut back on my current full time job. I have so many animals now I mine as well. My daughter has brought home rats, hamsters, rabbits, many of which we kept. Sadly in Stroudsburg PA, the only local animal shelter was closed down...my daughter volunteered there 3 days a week. Since the only shelter in Stroudsburg pa was closed so there has been an onslaught of "dumping" at the pet store. You would be better off aquiring a guinea pig from a rescue or shelter. Search high-kill shelters first, then no kill then rescues. Many pigs in these places more than likely were aquired at a petstore...another reason not to petstore purchase.
So to answer your question how to rescue from a pet-shop...you can't.