When did Hashem tell them to abandon their idolatry?
Rashi: Aharon gave this prophecy to them before Hashem revealed Himself to Moshe at the Sneh. So Hashem told Eli "ha'Niglo Nigleisi El Beis Avicha bi'Hyosam b'Egypt..." (Shmuel I, 2:27).
Radak: Beforehand, via the first Nevi'im; Moshe prophesized so to them.
Malbim: When He chose them, He stipulated that they are Kadosh to their G-d; they are not like all Nochrim. They must sanctify themselves in their deeds.
Why are they called "Shikutzei Einav"?
Radak: The eyes bring a person to sin - "v'Lo Sasuru Acharei Levavchem v'Acharei Eineichem Asher Atem Zonim Achareihem" (Bamidbar 15:39). Below it says "Acharei Gilulei Libam Holech", "v'Acharei Gilulei Avosam Hayu Eineihem" (16, 24). Chazal said, the eye and heart are two merchants of sin (Bamidbar Rabah 17:6).
Malbim: They are matters of idolatry to be drawn after Zenus, which is attributed to the eyes.
What are "Gilulei Egypt"?
Radak citing Targum Yonasan: The errant Avodah of Egyptians.
Malbim: They are matters of idolatry to serve and believe in vain folly. "V'Lo Sasuru Acharei Levavchem" is heresy; "v'Acharei Eineichem" is Zenus.
Why does it conclude "Ani Hashem Elokeichem"?
Malbim: All this [obligation to sanctify yourselves] is because "Ani Hashem Elokeichem"; you must be Kadosh, for I am Kadosh.