Do your research on what type of shoe is best for your sport. This doesn't entail asking friends what they wear.
Seek help. At running stores, employees are trained to watch customers walk or run, and offer a selection of shoes most likely to fit. Sporting goods stores have shoes arranged by sport.
Bring your old shoes. The wear pattern on the soles help experts determine how you've worn them down; i.e., if you walk inward on your shoes or walk on the outsole.
Shop at the end of the day. Feet swell; shoes that fit fine at 10 a.m. may be too snug by dusk.
Try them on. Walk around the store. Jog up and down the aisles. If you just take them for looks alone, you won't care about appearance once your feet start hurting.
Buy the right size. Yes, even if it is bigger than what you think you wear. In running and walking shoes, you'll need a pair at least a half to full size larger than usual.
Make sure they're comfortable NOW. Don't tell yourself, "Oh, they'll stretch." You should be able to put them on and start walking this very minute. Or playing tennis. Or sashaying through your aerobics class.