In an earlier question, I asked if it was a commandment to believe in G-d. As with so many areas, there were differing opinions. Some of the respondents claimed that there would be no point in being Jewish if one did not believe. While I disagree with that view, surely we all recognize that there are Jews who do not believe who, nonetheless, have varying levels of observance. Irrespective of whether or not one sees a point to doing so, should a non-believing Jew observe (the other) commandments?
In a word, yes. The Midrash (Eichah Rabbah, intro. 2), paraphrasing Jer. 9:12, states:
Or as the Talmud (Sotah 47a, et al) puts it:
- and goes on to illustrate this with the case of Balak, the Moabite king who offered numerous sacrifices with the improper intention of convincing G-d to allow the Jewish people to be cursed, yet who ended up being the ancestor of Ruth (and, through her, of King David and eventually of Moshiach).