Thank you for the question regarding the Torah/Law, “Was there a confession in the Torah before Leviticus?”
If I am not mistaken, most readers of this question would be puzzled by the above question since the Book of Leviticus is part of the Torah or the Law. It appears that one is making a distinction regarding the ordering or writing of the Torah. If I am not mistaken one was wondering about the JEDP Theory for the Torah or the Law.
If one holds to the JEDP Theory for the origination of the Torah, then each book of the Torah was written over different periods of time, not by one author. Since I have written on that topic and that is available online, it would be unnecessary for me to restate the theory.
As one reads Leviticus, there are possible confession for the Jewish faith within that book but not as revere in Deuteronomy 6:4–9. There repeated phrases within Leviticus referring to Moses, Aaron, and Aaron’s son as well as the words, “Say to the Israelites” in Leviticus 1:2, 4:1, 7:22, 28, 12:1, 15:1, 18:1, 20:1, 23:1,9, 23, etc. I wouldn’t consider them as confessions but instructions to Aaron and his sons as well as the Israelites. There is one particular phrase that is important in the book of Leviticus. This phrase is found in Leviticus 19:1. The words are as follows, “The LORD said to Moses, 2 “Speak to the entire assembly of Israel and say to them: ‘Be holy because I, the LORD your God, am holy” (A searchable online Bible in over 150 versions and 50 languages). Bible citations are in the New International Version.
As one reads Exodus, one of the Great Confession would be the Ten Commandments. This is found in Exodus 20. Every Jew would be able to recite by memory the Ten Commandments. If one was to place a time frame, then this confession would be before Leviticus.
The Great Shema confession is found in Deut. 6:4–9. I cite this passage for that is the main declaration by the Jews. “Hear, O Israel: The LORD our God, the LORD is one. 5 Love the LORD your God with all your heart and with all your soul and with all your strength. 6 These commandments that I give you today are to be on your hearts. 7 Impress them on your children. Talk about them when you sit at home and when you walk along the road, when you lie down and when you get up. 8 Tie them as symbols on your hands and bind them on your foreheads. 9 Write them on the doorframes of your houses and on your gates” (NIV). This confession would follow the confession in Leviticus. The Great Shema declares their faith in the LORD God and their duty before God.
I want to be very careful here for I can’t speak for the Jews nor for other Christians. This is my own personal observation. I may well be wrong on some points and would like to hear how Jews would answer that question.
SUMMARY: If one is looking at the order of the Torah, the earlier confession would be the Ten Commandments. That is just my opinion.
For more perspectives:
https://www.quora.com/Was-there-a-confession-in-the-Torah-before-Leviticus