Sure. Of course, the RF shield would have to be intimately attached to the board's RF ground plane.
If you are worried about EMI radiation, it would be much better if such a capacitor was INSIDE of the RF Shield. If it is outside of the RF shield, you might be forcing RF currents onto the skin of the RF Shield--making a pretty good antenna!