The 29-year-old striker, who represented his country at Euro 2012, was out of contract after leaving Bundesliga club Werder Bremen in May and his move remains subject to international clearance.
Baggies head coach Steve Clarke was delighted with the club's fourth summer signing after Ben Foster, Yassine El Ghannasy and Claudio Yacob.
"He is an experienced striker who has scored goals in three of Europe's top leagues, as well as in the top European competitions, and is determined to prove himself in the Barclays Premier League," Clarke said.
"Markus will really increase competition for places in the forward areas and hopefully spur on the strikers we already have here."
In total, Rosenberg has scored 83 goals in 186 league matches in Sweden, Holland, Spain and Germany, as well as six goals in 30 appearances for the national side.
- Steve Clarke