The Mishna teaches (Rosh Hashana 1:2) that Shavuot is the day of judgement for trees. The Tola’at Yaakov says that just as trees are believed, on a Kabbalistic level, to possess souls and are judged on Shavuot, so too are people judged onShavuot. More specifically, Shavuot is the day on which one is judged one’s neglect of Torah study in the previous year as well as on one’s success in Torah study in the upcoming year. Therefore, there is a custom to stay up all night on Shavuot to study to show Hashem our devotion to the Torah. The Sephardic custom is to read the special Tikkun (lit. “[spiritual] rectification) which includes passages for the Tanach as well as from the Zohar. Rabbi Ben Zion Abba Shaul (Or LeTzion vol. 3, 18:11) states that if it is difficult for one to complete the Tikkun, one may read the Tanach section and a few parts from the Zohar to fulfill one’s obligation.
The Shulhan Aruch (Orah Haim 47:12) rules that if one is awake all night studying, one does not recite Birkot HaTorah. The rationale, according to the Bet Yosef, is that these blessings are being said on the Mitzvah of studying Torah, and since there was no interruption between the previous day and the entire night, there is no need to recite them again. The Kaf HaHaim (O.H. 47:26), Rabbi Ben Zion Abba Shaul and Rav Ovadia Yosef rely on the Kabbalistic approach and rule that Birkot HaTorah should be recited even if one stayed up all night. Furthermore, there is a debate among the Poskim regarding whether one may recite the blessing ofElokai Neshama if one stayed up all night. Since there is a doubt regardingElokai Neshama and in light of the Shulhan Aruch’s ruling on Birkot HaTorah, the Moroccan custom is to omit the Birkot HaShahar and Birkot HaTorah altogether. In lieu of reciting these blessings, Rabbi David Banon, quoting that renown expert in Minhagim Rabbi Avraham Abuhatzira, says that the custom in Morocco was to ask someone who slept to recite these blessings on one’s behalf (see MagenAvot, 3rd ed., Orah Haim § 47). Furthermore, many Moroccan synagogues continue to practice this custom.
Summary: One should read the entire Tikkun on Shavuot, or at least all of the Tanach and some of the Zohar sections. If one stays up all night onShavuot, one does not recite Birkot HaShahar and Birkot HaTorah. One should hear these blessings from someone who did sleep to fulfill one’s obligation.