Take your time. Sellers who use bait and switch try to get time on their side and have you rush. When you rush you're not paying as much attention. Beware of people who want to make you rush.
Refuse a bag. Bags can hide a lot of sins. If there's no bag it's harder for the seller to hide anything.
Buy from reputable people. I love shopping at markets, but some people hate it. The noise, the sellers hawking their wares, etc. However, if you can build relationships with the people you buy from you'll find it can be a great experience. They might give you discounts or the latest and the greatest. Ask other people who they buy from and keep going back to people who give you good deals and good items.
Speak Spanish. Sick of getting the foreigner's price? Learn Spanish. Plain and simple. It's a pretty easy to learn a couple of words and phrases here and there. Knowing Spanish will help you assimilate to the culture and you'll be able to communicate easier. If you're looking to learn Spanish, Fluenz Spanish, Rosetta Stone, and Synergy Spanish.
Be careful about meeting people you find online. I find that living abroad is safer than living at home. I've met many of my friends online through Facebook, forums, and even Craigslist. Back home you wouldn't do that. However, not everyone is safe. Meeting people online can always be dangerous. Be sure to meet in a well-lit place, preferably during the day with other people around.
Trust your instinct. If something doesn't feel right it probably isn't. Move on and find somewhere else to go shopping.
The Ultimate Peru List recommends: