Here's a little hack I came up with. It serves two purposes:
a) it keeps the lamp cord in place (to prevent the lamp from being accidentally pulled down);
b) it is a door stopper; it prevents the door handle from slamming into the edge of the bookcase.
Cheap. Easy. It works.