Here is a quote from Calvin’s Institutes, Book II, Chapter VIII. He is explaining why the worship of God (the first four commandments) is the foundation for righteous living (last six commandments). It is very easy to focus on moral living without focusing on the worship of God. Calvin rightly says you should not do this. By religion in this passage he means right worship of God.

The first foundation of righteousness undoubtedly is the worship of God. When it is subverted, all the other parts of righteousness, like a building rent asunder, and in ruins, are racked and scattered. What kind of righteousness do you call it, not to commit theft and plundering, if you, in the meantime, with impious sacrilege, rob God of his glory? Or not to defile your body with fornication, if you profane his holy name with blasphemy? or not to take away the life of man, if you strive to cut off and destroy the remembrance of God? It is vain, therefore, to talk of righteousness apart from religion. Such righteousness has no more beauty than the trunk of a body deprived of its head. Nor is religion the principal part merely: it is the very soul by which the whole lives and breathes. Without the fear of God, men do not even observe justice and charity among themselves. We say, then, that the worship of God is the beginning and foundation of righteousness; and that wherever it is wanting, any degree of equity, or continence [self-restraint], or temperance, existing among men themselves, is empty and frivolous in the sight of God.