Shields, Upton key Rays' win over Minnesota