you can do this with a compositing tag.
there's little checkboxes in there in which you can tell it to not render the object, only it's shadow.