If I understand this correctly, you would use the shadowcatcher material here (it's in the works currently)...