It is impermissible
to write the words of the Testimony of Faith inside a grave and put the dead body on it, because this implies misuse of the Testimony of Faith. This is Bid`ah (innovation in religion). It was authentically reported from the Prophet (peace be upon him) that he said:
Whoever introduces anything into this matter of ours (Islam) that is not part of it will have it rejected.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.