May one study Torah in lieu of chanting Shir Hashrim?
Rabbi Israel Ya’akov Algazi (Hemdat Yamim) writes that it is a universal custom for Shir Hashirim to be recited before Shabbat. The Moroccan custom is for it to be recited between Minha and Kabbalat Shabbat. Rabbi Shalom Messas (Shemesh Umagen, vol. IV, Orah Haim, § 15:12) discusses a case in which a community prefers to have a Shir Hashirim between Minha and Kabbalat Shabbat, in which case he says that Shir Hashirim may be recited before Minha. If this is not practical, however, he writes that such a community could forego Shir Hashirim in deference to a Torah class. On the other hand, Rabbi Haim Kanievsky was asked about a similar case involving a Moroccan community, and he ruled that, because it’s spiritual loftiness, Shir Hashirim should be recited at its proper time. Rabbi Haim Binyamin Pontrimoli (Petah Hadevir, § 260:9) writes that one should not speak during Shir Hashirim, even in Hebrew, as it causes an interruption of the holy words.
Regarding the last stanza of Lecha Dodi, the Arizal (Sha’ar Hakavanot) writes that the source of turning to the west is in the Gemara (Shabbat 119a), which notes that Rabbi Hanina would go out to the fields to greet the Shabbat, which is compared to a queen. This idea is alluded to in the Piyut “Mizmor Shir Leyom Hashabbat” of Rabbi Mas’ud Abuhatzira when it says “Yetziat Shabbat Lehakbil Et Pene Shabbat Malketa”. Even though the custom is no longer to go out to greet Shabbat but rather to remain in the synagogue, Rabbi Moshe Feinstein (Igrot Moshe, vol. III, Orah Haim, § 45) based on the Pri Megadim (§ 262), writes that one should still turn to the west when reciting the last stanza of Lecha Dodi. He explains that Hashem’s Presence is to the west and therefore, even if the Hechal is not exactly to the east, one should not turn opposite the Hechal, but rather still to the west. It appears as though the original Moroccan custom was not to turn to the west during the last stanza, but over time, the universal custom has evolved to do so
Summary: Shir Hashirim is recited between Minha and Kabbalat Shabbat, and it should not be skipped. One should turn to the west when reciting the last stanza of Lecha Dodi.