Are we talking rats here?
If soooo.... in my experience there's not a great deal you can do. Whatever you paint on will be chewed off at some stage and all the sealing of the wood goes to pot then.
Soaking the shelves in a dilute solution of biological washing powder may help as the enzymes in this will tackle organic odours, but they will have to dry out after and you'd need to do it every week or so.
If it's not rats - then please accept my apologies
