סימן קלט סעיף יז
בְּעֶרֶב שַׁבָּת, מַדְלִיקִין תְּחִלָּה נֵר חֲנֻכָּה, וְאַחַר כָּךְ נֵר שַׁבָּת, וּבִלְבַד שֶׁיְהֵא לְאַחַר פְּלַג הַמִּנְחָה. וּמִתְפַּלְּלִין תְּחִלָּה מִנְחָה. וְצָרִיךְ שֶׁיִתֵּן שֶׁמֶן כְּדֵי שֶיִדְלְקוּ עַד חֲצִי שָׁעָה לְאַחַר צֵאת הַכּוֹכָבִים. דְּאִם לֹא כֵן, הֲוֵּי לֵהּ בְּרָכָה לְבַטָּלָה. וְאִם מַדְלִיק אֵצֶל הַפֶּתַח, צָרִיךְ לִזָּהֵר לְהַפְסִיק בְּאֵיזֶה דָבָר בֵּינָם לְבֵין הַדֶּלֶת, שֶלֹּא יְכַבֵּם הָרוּחַ בִּפְתִיחַת וּנְעִילַת הַדֶּלֶת.
On erev Shabbos you should first kindle the Chanukah lights, then the Shabbos candles24According to most Poskim, however, if you have not yet accepted the Shabbos [mentally], even though you lit the Shabbos candles, you may still light the Chanukah candles. A woman who usually accepts the Shabbos when lighting candles, should not light Chanukah candles after she lit the Shabbos candles. (Ibid 679:1; See also Shaar Hatzion 679:2; See also Kitzur Shulchan Aruch 75:5) but it should be after pelag haMinchah.25See Kitzur Shulchan Aruch Chapter 69:2. Before lighting them you should pray Minchah. You must put in enough oil to keep them burning until one-half hour after the stars come out, otherwise the berachos you say over them are in vain. If you light the menorah near the door, you must be careful26This ruling applies to weekdays as well. (See Mishnah Berurah 680:1) to place something between it and the door, so that the wind will not blow it out when the door is opened and closed.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)