Hacham David Ben Shimon, son of Moshe, was born in Rabat, Morocco in 1826. Rabat was a Torah learning center at the time and Hacham David studied with the city's sages and rabbis, in particular with Hacham Sa'adia Marache. He was married at a young age, with Rachel, daughter of Hacham Masoud Sabbah.
Hacham David Ben Shimon studied Torah diligently and was committed to his community's welfare and organization. Despite his young age, he surrounded himself with students, training them to be rabbinic judges, circumcisers, ritual slaughterers, scribes and cantors. His students served in the Rabat community and beyond, throughout Morocco.
In 1854, his love for the Land of Israel led him to leave his beloved students and community, and he set off for Jerusalem. There he met the Adat HaMograbim, the community of Jews from the Maghreb, living in deep poverty along with the Sephardic community within the city walls. Hacham David Ben Shimon established the Maghreb community's institutions and stood at their helm.
In 1860, he participated in the founding of the Mishkenot Shaananim quarter outside the Old City walls, ensuring that members of the Maghreb community could settle within it. He founded the Mahane Israel quarter in 1866. Built initially for the Maghreb community, it housed members of other communities as well. Hacham David Ben Shimon also worked towards the settlement of Jews beyond the boundaries of the city of Jerusalem, helping families that had emigrated from Morocco settle in agricultural areas in Motza and near Jaffa.
The number of Jews immigrating to the Land of Israel from Morocco continued to rise, and in 1866, Hacham David Ben Shimon chose seven notables to work alongside him in settling the Land.
Now that he was in Israel, he focused his study on the Land of Israel and its leaders. He planned a book, Shaarei Tzedek, in four volumes: Shaar HaHatzer, a collection of textual sources written in praise of the Land of Israel and that would include Hacham David Ben Shimon's commentary, Shaar HaMatara, on halakhot dealing with the Land of Israel, Shaar HaKadim, on commandments that are contingent on [living in] the Land of Israel and Shaar HaMefaked, the collected customs of the Land of Israel and Jerusalem. In 1862 he succeeded in publishing only the first volume, Shaarei Tzedek. His remaining books, along with additional writings, were published after his death by his son, Raphael. These include a book of Responsa, entitled Matsor Devash, in which his son integrated some of his own answers with his fathers', and a book of poems, Shirei Tehila.
In 1879 Hacham David Ben Shimon became seriously ill. He passed away on 18 Kislev, 5639 (1879) and was buried on the Mount of Olives.