The Rays are said to be seeking "north of Greinke," referring to the three-prospect package the Brewers got for star pitcher Zack Greinke, who is a free agent after the season. So if they do trade him, it will obviously be expensive in terms of the prospect return.
The Rays have seven viable starting pitchers, which allows them to even consider such an accomplished pitcher. Shields isn't having the same year he had in 2011 but his options of $9 million and $12 million the next two years are reasonable for a big-market team.
The Rays could also trade Shields in the winter, as those options are not cheap for them.