History of the Shabti and Ushabti
Shabti's were used from the Middle Kingdom (around 1900BCE) until the end of the Ptolemaic Period (about 2,00 years later).
The word shabti applies to the figurines prior to the 21st Dynasty of Egypt. After the 21st Dynasty, the term ushabti was used.
Shawabti were a separate class of funerary figurines from the Thebes area during the New Kingdom.
Ushabti/Shabti incantation prayer
Shabti and Ushabti inscriptions on the lower half of the figurine's body often contain a portion of the 6th chapter of the Egyptian Book of the Dead, translated as:
"Illumine the Osiris NN, whose word is truth. Hail, Shabti. If the Osiris NN be decreed to do any of the work which is to be done in the Khert-Neter (i.e. the cemetery), let everything which standeth in the way be removed from him whether it be to plough the fields, or to fill the channels with water, or to carry sand from (the East to the West). 'Here am I', you shall say, 'I shall do it.'" (Example, for NN, Akhenaten, "Osiris Akhenaten").
In rare cases different chapters of the Book of the Dead are written. Furthermore, shabtis often mention the name and the titles of the owner, without the spells of the Book of the Dead.
The spell is already known from the Coffin Texts spell 472, which is found on some mid-Twelfth Dynasty coffins from Bersheh (about 1850 BC). From wikipedia: shabti