How to show the shadow of the object on the object which is placed behind that

It is hard to tell what is wrong without seeing the code and, preferably, a live demo, as described in the pinned topic.

Did you follow the example from the docs?