The tefillin boxes (called battim) house strips of parchment with four passages from the Torah written by a specially trained scribe, known as a sofer. Tefillin contain the following biblical verses:
God spoke to Moses, saying, “Sanctify to Me every firstborn that initiates the womb among the Israelites. Among both man and beast, it is Mine.” Moses said to the people: Remember this day as the time you left Egypt, the place of slavery, when God brought you out of here with a show of force. No leaven may be eaten. You left this day, in the month of standing grain. There will come a time when God will bring you to the land of the Canaanites, Hittites, Amorites, Hivites and Yebusites. He swore to your ancestors that He would give it to you – a land flowing with milk and honey. There too you will have to keep this service. Eat matzahs for seven days and make the seventh day a festival to God. Since matzahs must be eaten for these seven days, no leaven may be seen in your possession. No leaven may be seen in all your territories. On that day, you must tell your child, “It is because of this that God acted for me when I left Egypt.” These words must also be a sign on your arm and a reminder in the center of your head. God’s Torah will then be on your tongue. It was with a show of strength that God brought you out of Egypt. This law must therefore be kept at its designated time from year to year.
There will come a time when god will have brought you to the land of the Canaanites, which he promised you and your ancestors, and He will have given it to you. You will then bring to God every firstborn that initiates the womb. Whenever you have a young firstling animal, the males belong to God. Every firstling donkey must be redeemed with a sheep. If it is not redeemed, you must decapitate it. You must also redeem every firstborn among your sons. Your child may later ask you, “What is this?” You must answer him, “With a show of power, God brought us out of Egypt, the place of slavery. When Pharaoh stubbornly refused to let us leave, God killed all the firstborn in Egypt, man and beast alike. I therefore sacrifice to God all male firstling animals, and redeem all the first-born of my sons.” These words shall also be a sign on your arm and an insignia on the center of your head. All this is because God brought us out of Egypt with a show of strength.
Hear O Israel, God is our Lord, God is One. Love God with all your heart, with all your soul and with all your might. These words which I am commanding you today must remain on your heart. Teach them to your children and speak of them when you are at home, when traveling on the road, when you lie down and when you get up. Bind these words as a sign on your hand, and let them be an emblem in the corner of your head. Also write them on parchments affixed to the doorposts of your houses and gates.
If you are careful to pay heed to my commandments, which I am prescribing to you today, and if you love God your Lord with all your heart and soul, [then god has made this promise]: “I will grant the autumn and spring rains in your land at their proper time, so that you will have an ample harvest and grain, oil and wine. I will grant forage in your fields for your animals, and you will eat and be satisfied.” Be careful lest your heart be tempted to go astray and worship other gods, bowing down to them. God’s anger will then be directed against you, and He will lock up the skies so that there will not be any rain. The land will not give forth its crops, and you will quickly vanish from the good land that God is giving you. Place these words of mine on your heart and soul. Bind them as a sign on your arm, and let them be an insignia in the center of your head. Teach your children to speak of them, when you are at home, when traveling on the road, when you lie down and when you get up. Also, write them on [parchments affixed to] the doorposts of your houses and gates. You and your children will long endure on the land that God swore to your ancestors, [promising that] He would give it to them as long as the heavens are above the earth.
There is a difference of opinion regarding the order in which the passages are inserted into the tefillin boxes (known as battim). According to Rashi, the Shema (“Hear O Israel”) precedes that of “If you are careful to heed my commandments” in both the arm tefillin and the head tefillin. According to Rabbeinu Tam, the order is reversed. The consensus among the Rishonim is to follow Rashi’s opinion.