Juventus general manager Beppe Marotta told Sky Sport Italia that the 33-year-old ex-France international would help solve an "emergency" situation in attack.
"It can be a good move for the short term, then at the end of the season we'll evaluate what must be done," he said.
"He is filling a hole. It is a five-month contract with an option for the second season, if things go well.
"Anelka's arrival rules out any other transfers, because in this stage of the transfer window there are no other opportunities."
Anelka joined Shanghai a year ago and was later joined by his former Chelsea team mate Didier Drogba.
Juventus agreed this week to sign Athletic Bilbao's Spain forward Fernando Llorente on a four-year deal, although he will remain with the Spanish club until the end of the season.
- Sports & Recreation