Well you see, in reality, shadow is simply the absence of light. So to make something shadeless and receive shadows doesn't make any sense at all.
But of course, there is always a way around the laws of physics :)
There may be a few ways to do this, but the first that comes to mind is compositing:
Your "shadeless" material should just be a regular material with shadeless turned off.
Then you need to give a unique Object Index (or Material index) for the objects with shadeless materials - this will allow to do compositing for only those objects:
Then enable some render passes:
- Shadow to give you... well, shadows.
- Object Index so that you can isolate those shadeless objects.
- Color so that you get the material color without any shading.
So when you render, you'll get:
Plain uncomposited render:
Then in the node editor, you simply need to multiply the Color and Shadow passes to get your shadeless but with a shadow effect:
And then use the ID Mask node to isolate the objects that you want to be shadeless, and use that as the Fac to mix the raw render and the shadeless part together (so that only the objects that you want to be shadeless are shadeless):
Download the .blend
Note: If you get aliasing issues, enable Full Sample in the render settings.