According to two key verses, confession of Christ is necessary for salvation.
Romans 10:9 That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved.
Matthew 10:32 Whosoever therefore shall confess me before men, him will I confess also before my Father which is in heaven. 33But whosoever shall deny me before men, him will I also deny before my Father which is in heaven.
I do not know how to explain these verses to say that simple believing in your heart without any kind of outward expression (“confession” is the keyword used in Scriptures) does not leave you saved. You may be at heaven’s gate, but apparently God requires some kind of public expression of this faith to really enter salvation. This is not a work, but a reality of belief. Belief in order to be real and “theoretical” or “philosophic” must have outward expression in your personal life.
I will relate how I explain this in witnessing. If two young people are dating, and the boy says to the girl that he wants to marry her. She gets all excited and starting planning the wedding, the dress, etc. The boy stops her and says, “No, we are going to get married, but it will be a secret between you and me. There will be no marriage license, no ceremony, no preacher, and no witnesses, nobody but you and me will know about it. Moreover you will continue to live with your parents, and me with mine, and that is the way it will be forever.” Any sensible girl will simply say, “If you truly love me, then you will make it all public, or else I will not do anything with you.” Indeed, a public marriage ceremony where all the family, friends, co-workers, etc. of both parts are present and witnesses is what marriage is all about. Making a public commitment to another person.
Belief in Jesus as your Savior has to hinge on a public aspect. The thief on the cross is the minimalist example. We must absolutely separate this from any work in particular (like baptism, or coming forward in an invitation, or church membership) in order to be saved. It is not a work that is needed to be saved, but a faith that is not ashamed of Christ, but a faith that hangs its hopes of salvation on Jesus, exclusively and publicly.
Romans 1:16 For I am not ashamed of the gospel of Christ: for it is the power of God unto salvation to every one that believeth; to the Jew first, and also to the Greek.
Romans 9:33 As it is written, Behold, I lay in Sion a stumblingstone and rock of offence: and whosoever believeth on him shall not be ashamed.
Romans 10:11 For the scripture saith, Whosoever believeth on him shall not be ashamed.
Isaiah 49:23 And kings shall be thy nursing fathers, and their queens thy nursing mothers: they shall bow down to thee with their face toward the earth, and lick up the dust of thy feet; and thou shalt know that I am the LORD: for they shall not be ashamed that wait for me.
1 Peter 2:6 Wherefore also it is contained in the scripture, Behold, I lay in Sion a chief corner stone, elect, precious: and he that believeth on him shall not be confounded (put to shame, suffers a repulse, some hope which leaves one in deception).
However you take these verses, one thing is sure, God does not grant salvation to somebody who is ashamed of Jesus Christ, and specifically his suffering and death on the cross. If you cannot or refuse to communicate that as your hope of salvation, then you are not saved, even though you may understand a lot about salvation, desire to be saved, and trying. In the analysis which God gives of these things, you are not saved.
I would add that apparently the thing or event that God has commanded for all believers to publicly confess Christ is in the water baptism. I say that after having written books on baptism and against baptismal regeneration. Getting wet does not get a person saved. What gets a person saved is faith in Jesus as your Savior that makes a public expression of that faith.
There is a law here that as difficult as it is to understand and handle properly, we must insist upon it. People are not saved by faith that never manifests itself by outward evidences. I have witnessed to people who are timid and bashful, and do not want to pray out loud. Nor do these want to go forward, publicly before the church confess Christ, nor be baptized. Personally I doubt the sincerity of their belief. They are playing with God. I cannot see their heart, so as a rule I do not pretend to know what they have done. But in the end, we must publicly confess Christ somehow. I have witnessed to bedridden elderly who accept Christ and later die without baptism. I have no doubt that if their public confession to me was sincere that they are saved without baptism. They may never have been on a church’s roster of members, and they may have never gone forward in an invitation, but I believe they were saved. Yet the issue here is when it is easily possible to confess publicly Christ and they do not. Even the thief did make a confession of Christ as the Savior which apparently saved him.
I think that a great many Christians miss the entire point of much of the New Testament. This public identification with Christ is what the local church is all about. A biblical New Testament local church is a group of people in one locality that get together to identify themselves with Jesus Christ. Their purpose and charter from God goes much beyond identification. They band together under the authority and direction of God to do God’s will, which expressly is the work of God.
Salvation does not depend on church membership, but every truly saved person will seek to be an active part of a good church.