Translation:Arukh ha-Shulchan/Orach Chaim/679
On Shabbos eve one must light the Chanukka candles before the Shabbos candles. This is not only true for one who accepts Shabbos upon himself through the act of lighting the Shabbos candles, when it is certainly prohibited to light afterward, but is even true for one who does not accept Shabbos upon himself through lighting the Shabbos candles. Even in the later case it is not possible to light the Shabbos candles before the Chanukka candles, since it is not proper to engage in weekday actions (Melachos) after the Shabbos candles are lit.
This idea, that the last weekday activity is the lighting of the Menorah, was also the practice in Tamudic times (as the Ran explains at length in his commentary in the second chapter). This is also implicit in the text of the Tur, where he writes the BeHag's ruling that "Chanukka candles precede those of Shabbos because lighting Shabbos candles is equivalent to accepting Shabbos upon oneself". The Tur continues further and notes that "the Tosafos write that Shabbos' acceptance is not contingent on lighting, and one may even light first and then...etc." Until here is the quote. The meaning of this second clause is that while as a matter of technical law one may light the Shabbos candles first, it is a more proper practice to light the Chanukka candles first (the Bach writes similarly, see there).
It should be noted that the Rashba, of blessed memory, takes a different tack, and rules that the Shabbos candles be lit first, becuase of the legal maxim 'the more common occurrence takes precedence' (Tadir, v'Sheaino Tadir, Tadir Kodem) (Rashba responsa, volume 1, resonsa 1, section 70).
I was surprised by this ruling. Hasn't that Talmud itself (Gemara Shabbos, 23.2) ruled that one who does not have the funds for both Kiddush wine and Chanukka buy Chanukka candles because of the primacy of 'publicizing a miracle', even though Kiddush is a more common occurrence? To answer this one must conclude that he reasons that this would not apply where a Mitzvah would be completely lost, only to where it is merely a question of which to perform first. In fact, Tosfos can be seen to offer this distinction in his comments on that text. There is also an additional reason fo the Rashba that is worth mention: If one lights Chanukka candles on Shabbos eve it will still be daytime and the ability to publicize the miracle is not yet in effect.
His position notwithstanding, the widespread custom in all Jewish communities is to light the Chanukka candles before the Shabbos candles, since our women accept Shabbos by lighting the Shabbos candles. Even if a man were to light the Shabbos candles and explicitly state that he is not accepting Shabbos by that act - which would allow him to light after that even according to the BeHag - he should nevertheless light the Chanukka candles first. If, however, he had already lit the Shabbos candles he may light those of Chanukka afterward as long as he had not accepted Shabbos upon himself with the first lighting. If he had accepted Shabbos, or his wife lit and accepted Shabbos, as is the default practice, another should light the Menorah and he/she hears and responds 'amen'.
On Shabbos eve one still recites the blessing '...to light the Chanukka candles" (Lehadlik Ner Chnukka) even though he is lighting early, while it is yet daytime. Since there is no other option available the obligation is forced to devolve upon him at this time. At the very least it is no worse than the 'preparation for a Mitzvah' (Hech-sher Mitzvah), which also is known have blessings applied to it, as is found in the construction of a Succah before the festival, where the law stated by Talmud is to recite a Shehecheyanu on this act (Gemara Succah, 46.1). The Yirushalmi in Berachos (chapter 9, law 3) even adds the blessing '...to build a Succah' (La-Asous Succah). Certainly, then, this can be applied to lighting the Menorah on Shabbos eve.