You can use the light path node's camera output to control a mix shader's factor input. Then plug your glass shader into the second input and a transparent bsdf into the first input. This will make the object visible to the camera, but invisible to other surfaces, so effectively light will pass through it.