For shadows on your image you need a normal map. When your image is named “bg.png” the name of the normal map must be “bg_NORMALS.png” (and “bg_SPECULAR.png” for the specular map).
For objects to have longer shadows there is an example called “renderdemo” which uses shadow casters. To be honest I never used them and implemented my own shaders instead. This approach is a bit more complicated but gives you much more control at the same time.