This is probably the most asked question among new runners - and for good reason! When your sport requires no equipment other than the shoes on your feet, you want to make sure those shoes are the very best they can be. But choosing the right shoe is not a "one size fits all" thing (pun intended). The shoe that works best for you will depend on the way you run (i.e. how and where you carry your weight, how you land on your feet during your stride, etc) and the size of your feet, as well as any special injury or preventative measures you will need (i.e. extra arch support, correction for over- or under-pronation, etc).
Since it sounds like you are new to running and are starting out with a 5k, it is probably a good idea to air on the side of caution and just go for very supportive and cushioned shoes. These kinds of shoes typically have a much thicker sole than their minimalist counterparts, and offer a lot of stability for ankles, arches, and heels. Plus, they last for a really long time so you can safely put many miles on them as you start to slowly increase the amount you are comfortable with running, and from there, you can best decide if they really are the right kind of shoe for you in the long term. Asics, Brooks, and Mizuno are all very well respected running shoe brands on the market today, and all offer great shoe model options with thicker insoles and plenty of stability (they even carry models that have added support and comfort with a gel insole, to curve to your feet and better absorb shock). One of the most important things to consider when purchasing a new shoe is how far out you plan to do you 5k, from the time you first buy and start wearing the new shoes. You should NEVER race in a brand new pair of shoes because you never know how they will feel on your foot, and if you can comfortably and efficiently run in them. Make sure you plan your training and purchasing far out enough in advance to "break them in" and put in some serious miles on them.