While James pointed out that if your behavior doesn’t reflect belief, then you don’t actually believe. The point is that being showy doesn’t score you points, living by the principles — because you believe they are right — is all that matters.
Judaism has a concept for the Righteous Gentile. You don’t have to believe in their god, if you live by the Noachide moral precepts, even unintentionally, then you are righteous.