Shields fans 7 in 6 innings, Rays beat Pirates