The duo played together at San Siro last season before Ibrahimovic joined Paris Saint-Germain in the summer.
"To tell you the truth, it was never easy playing with Ibrahimovic," the 19-year-old told French magazine Max.
"You have to know how to handle him. Really, what you needed to do was just pass him the ball, or else he'd scream at you or just play tricks on you afterwards."
El Shaarawy joined Milan from Genoa in the summer of 2011.