Fluminense attacker Fred starred for Brazil during the FIFA Confederations Cup in 2013, scoring five goals in as many games, including a double in the 3-0 triumph over Spain in the final.
However, since then he has managed to score only once in five appearances and after two anonymous displays against Croatia and Mexico in the FIFA World Cup he has come in for criticism.
The media in Brazil has widely scrutinised the former Lyon man's performances, particularly his ineffectual show against Mexico, while ex-England striker Shearer also added his views.
Shearer criticised Fred's poor movement and general ability, drawing Alves's ire in the process.
The Barcelona man told reporters: "Those comments are some of the most idiotic that anyone can ever say.
"Someone who played football, who knows how difficult it is to be a football player, how difficult it is to beat opponents, compete, score goals, it's a shame for football and a lack of respect for his colleagues that play the game.
"It's something to be ashamed of."
Brazil faces Cameroon in its final group match on Tuesday (AEST).