The causeway leading to the Pyramid of Unas from the valley temple.
Upon entrance to the Great Pyramid of Giza in 1798, the French were struck by the complete absence of writing or relief carving on its walls. Thus it came as a surprise when Gaston Maspero finally managed to gain entrance to some of the smaller pyramids at Saqqara, including the Pyramid of Unas in 1881, he found their walls inscribed with hieroglyphic texts. Unas, the last ruler of the Fifth dynasty, is the first king known to have constructed one of these pyramids whose interior chambers were inscribed with magical incantations. Eleven more pyramids similarly inscribed have been found, spanning the Sixth to the Eighth dynasties. Although the pyramids themselves are small and nondescript, their walls preserve the earliest literary texts produced in Egypt—now known as the Pyramid Texts. Curiously, the magnificent pyramids of the Fourth Dynasty are completely mute. No inscriptions have been found inside them.
The interior chambers of the pyramid were inscribed with magical utterances.
Magic
The Pyramid Texts are comprised exclusively of magical utterances. The underlying premise is that the gods and spirits inhabiting our world may be moved to act if the right words are spoken in the right way at the right time by the right person. Many of the incantations are directed to the spirit of Unas while others are directed to the gods.
O Unas, stand up, receive this your bread from (my) hand! O Unas, I am your helper!”
Re-Atum
Another important concept embedded in the Pyramid Texts is that after death, the king must ascend to the sky and become one with the sun disc, Re-Atum.
Re-Atum! your son comes to you, Unas comes to you. Let him ascend to you! Enfold him in your embrace! This is the son of your body, eternally!
Both Re and Atum refer to the sun god in the Pyramid Texts: Re being the aspect of the sun when it rises, and Atum when it sets. When the two names are combined, they refer to the sun in its totality. It was necessary for Unas to find Re-Atum since it was the boat of the sun god that would transport Unas into the afterlife.
Judgment
Another purpose for the Pyramid Texts was to prevent a negative verdict from being rendered against Unas by the gods.
He lives! He lives! This Unas lives! He is not dead, this Unas is not dead! He is not gone down, this Unas is not gone down! He has not been judged, this Unas has not been judged! He judges, this Unas judges!
Belief in the efficacy of magic as a means of easing one’s way into the afterlife will remain a central theme of later Egyptian texts, most notably, the Book of the Dead.
Breasted, J. H.
A history of Egypt, from the earliest times to the Persian conquest.
London: Houghton & Stodder, 1927. Link