Which Light Comes First
Which Light Comes First Shabbat or Chanuka?
In every eight days of Chanuka there must be at least one Shabbat. This year, 5763, there are two. For Shabbat-Chanuka we have two mitzvot related to candles - Shabbat lights and Chanuka lights.
Which comes first in importance and which in order of performance?
The issue of relative importance arises in a situation where one has limited funds and can afford to buy candles for only Shabbat or for Chanuka. Which deserves priority?
Resolution of this issue, declared the Sage Rava, is a simple matter. Shabbat candles take priority because of "Shalom bayit" (the family is uncomfortable sitting in the dark - Rashi). This ruling, codified in the Shulchan Aruch (Orach Chaim 678:1), is modified by the later authorities who write that although it is proper to light at least two candles in honor of Shabbat, in a case of limited funds it is preferable to make do with only one Shabbat candle and to use the remaining funds to purchase a candle for Chanuka.
When there are sufficient funds for both, but it is only a question of the order of performance, the Shulchan Aruch (Orach Chaim 579:1) rules that the Chanuka candles should be lit before the Shabbat ones. The reason for this is because there is a halachic opinion that once you light the Shabbat candles you have accepted upon yourself the sanctity of the Sabbath and are now forbidden to light the fire necessary for the Chanuka lights.
Since a man does not customarily light the Shabbat candles, his lighting them by mistake before the Chanuka ones will not prevent him from subsequently lighting the Chanuka candles unless he expressly thought of accepting the sanctity of the Sabbath. If it is a woman lighting the Chanuka candles because her husband is away, we consider her lighting of Shabbat candles as an acceptance of Sabbath sanctity just as it is every Shabbat eve throughout the year. If she mistakenly lights the Shabbat candles first she should therefore ask someone else to light the Chanuka ones for her, and also to say the first blessing upon them. She herself should say the other one (or two if it's the first night of Chanuka).
Sources: Shabbat 23b