How to pick the right shade of foundation?

I have never been good at this. It has been a couple years since I last bought foundation and I plan on going to target tomorrow to pick some up. I already know which one I will be getting, since someone recommended it to me. I just have no clue which shade to buy.