Shulchan Aruch Chapter 678:
The Shabbat Candles Take Priority Over the Chanukah Candles (1 Paragraph)
Note:  The REMA is in Brackets [ ]

1.  One who has insufficient means to purchase both Chanukah Candles and Shabbat Candles should purchase Shabbat Candles because (they bring about) peace in one's household (1) [see 263:3].  If one already owns Shabbat Candles but only has enough means to either purchase wine for the Shabbat Kiddish (קידוש) or Chanukah candles, one should purchase Chanukah candles since it involves showing off the miracle.  [Similarly, Chanukah candles come before the wine of Havdalah (הבדלה).  See 296:5.]
(1) The M.B. states that if one has 2 candles, one should be used for the Shabbat and the other should be used for Chanukah.

Shulchan Aruch Chapter 679:

No Title (1 Paragraph)

1.  On the eve of Shabbat we light the Chanukah candles first and then light the Shabbat candles.  [We recite the blessing over them just like we do during the week even though we light them while the day is still strong. (2)]
(2) The M.B. writes that according to many of the later Sages the Chanukah candles must burn half an hour after the stars come out.  Since on Shabbat, we light the Chanukah candles very early, at least one of the candles must be big enough to burn from that time until a half an hour after the stars come out. 

Shulchan Aruch Chapter 680:
To Not Place the Candles Near the Door On The Eve of Shabbat (2 Paragraphs)

1.  On the Eve of Shabbat, it is necessary to place something outdoors between the Chanukah candles and the door in order to shield it from a draft so that the candles should not be extinguished when the door is closed.

2.  On the Eve of Shabbat it is prohibited to attach the candles to the door itself (3) but there are some who permit it (see 277:1).
(3) The M.B. writes that the reason is when the door is open and closed, the oil in the Chanukah lamps will either flow to the wick or flow away from the wick and the fire will increase or decrease.  This is prohibited on the Shabbat.

Shulchan Aruch Chapter 681:
One May Not Use the Chanukah Candles For Havdalah (הבדלה) After Shabbat is Over (2 Paragraphs)
Note: REMA in Brackets [ ]

1.  When Shabbat is concluded, we don't perform the Havdalah (הבדלה) ceremony over them because it is forbidden to benefit from the Chanukah candles.  We also do not make the blessing over the (Havdalah) candle until it is already lit.

2.  In the Synagogue, we light the Chanukah candles before performing the Havdalah (הבדלה) ceremony.  [Certainly in the home, one does the same and lights the Chanukah candles before Havdalah (הבדלה) since one already witnessed Havdalah (הבדלה)  in the Synagogue.]
Translated by Dr. Jay Dinovitser D.O.
Free For Personal Use Only     12/09

If the page has Hebrew text, it prints better in Internet Explorer.