I don't take much notice of them, to be honest, unless it's meat, chicken or fish. However, we don't freeze meat, chicken or fish; we use it straight away. Vegetables are bought directly from the shelves - there are very few pre-packaged vegetables on sale over here. Buying direct from the shelves means I can ensure I'm buying the freshest produce, and can check for blemishes or bruises.
As for packaged products, it's a question of checking for smell (you can detect mould or fermentation, for example), for weevils or moths, or sometimes (especially in the case of spices) just the colour. Brown, dull paprika, for example, will probably not add much to your dish.