Shadow acceptence

I have a rather strange question. I need a mesh to cast shadows and also to accept them from other at the same moment. BUT i want to render shadows only. Cast shadows are clear. But how to create a “material” which consist only from accepted shadows and does not render anything else? It should create a ghostly effect.