Easy in Blender Render. Not so much in Cycles.
It's easier to just add the nodes manually rather than trying to use the graphical interface. Just do it!
Using the nodes above, notice the shadows on the wall and picture frame (lower rail), but not on the "picture":