A fence is usually too large for a shelf and a fence is not a part of a shelf.
Pick which sentence is not logical.

- "he was putting up a new fence at his home"
- "he was putting up a new fence at his shelf"