Oh this brings back memories, not sure if it’s the one but are you thinking of 'The Littles'? They didn’t live in a shelf but it was about tiny people with a society hidden from humans. It was animated tho, maybe there was a live action version I never heard …