Ride them for a few miles and see how they feel. Some handle better than others. Some gears are easier to shift than others. This is the most important part of buying a bike. You must be comfortable with how it rides, especially if you're going to spend any amount of time in the saddle.
Most shops offer one free tune-up after the purchase of a new bike.
Make sure your bike gets that plan. In addition, many shops offer mechanics classes for a low cost, and these are worthwhile. Helmets and bike shorts are a must. Helmets because you need to keep your head in tact, and bike shorts because you need to keep your legs and butt in tact. You also should invest in some kind of a fanny pack, which fits on the bottom of your seat and carries a spare tube and tire levers.