Follow these tips so that the next time you go shopping, you'll know when to buy generic.