If you want to check out a shelf/locker, stand besides it, press 'e’xamine, and then press the directional key towards the locker.
I.e if you’re standing “above” a locker/shelf/fridge, press 'e’xamine then down arrow.
You can also get a list of all the items in your field of view by pressing ‘V’, it will not show items inside containers (like fridges) but it will show items on shelves (what you usually find in stores)