Jesus says in Matthew that the only way to Heaven is if you keep the commandments. If you don't and you want to have eternal life, give all you stuff to the poor.
In order to attain heaven we must obey Christ. We must do what he said to do.

I am so confused... I thought you had to believe only in Jesus Christ and you will be saved from sin???
The idea that all you have to do is believe, and that belief doesn't involve action, is a heresy. A common heresy, but a heresy nonetheless. Satan himself believes that Jesus is Lord.
The Hebrew word
aman is translated as believe, trust, have faith, and also support, nourish, and make lasting. A derivative word is
omenat, meaning pillars or supports of the door as in 2 Kings 18:16. Another cognate is
emunah, which is faithfulness or trust, as in Exodus 17:12 where God brought victory to Israel as long as Moses would hold his hands up. Aaron and Hur held up his hands so that they remained
emunah until sundown. All of these illustrate that faith is an action that we take. Faith
is a work, it's about what you DO and not merely about what you believe.
We are not able to do this work by our own effort, because of the effects of original sin. Each and every time we turn toward God and away from sin it is because God gave us
at that moment the grace to be able to do it. It is completely and totally due to the grace of God, who enables all of us at some point in our lives to perform the work of freely responding to Him by performing the "obedience of faith". At that moment we truly have the choice that Adam had, to submit to God or submit to ourselves, and we only have that choice because of Gods grace.
The Catechism of the Catholic Church expresses this by saying that faith is an act of the will in which one turns toward God and away from sin; in which we decide that we will cooperate, with our intellect and will, with the divine grace that God gives us to enable us to comply with the moral law; it is a free response of the human person to the initiative of God; it is a personal adherence of the whole man to the God who reveals himself. It is the theological virtue by which we believe in God and believe all that he has said and revealed to us, and that his Church proposes for our belief, because he is truth itself. By faith "man freely commits his entire self to God." For this reason the believer seeks to know and do God's will. "The righteous shall live by faith." Living faith "work
through charity."
These are all actions, things we do in obedience to God. Thus the Apostle Paul says in Romans 1:5 "Through Him we have received the grace of apostleship, to bring about the obedience of faith... This obedience is the essence of Christianity: submission to the Eternal One who was enfleshed, and through that submission being brought into union with Him so that we may participate in His divine life.
Its important to understand that the Catholic view is not that we are a spirit stuck in a body, nor are we a composite of a body, a soul and a spirit as is commonly held among Protestants. God created us as a body/soul unity, not two things stuck together but one whole. As we pray with our minds using words, so we also pray with our bodies using actions. As we submit to God with our wills, so we also submit with our deeds. To speak of faith as separate from works is schizophrenic, because faith is the assent of our minds enfleshed in our actions.
We know that to observe the Ten Commandments is to conform oneself to God's will, because Jesus says that the essence of the Commandments is to love the Lord with all your heart, and your neighbor as yourself (Matt 22:36-40). We also know that natural man can't do that because of Adam's Fall, so the only way we can truly observe the Commandments is by the grace of God... which means that obedience to the commandments is a work of GOD in us! These are NOT works of men, they are works of God's grace by which He gives us the ability and means to freely bind ourselves to Him.
What must I do to be saved? Submit in obedience to the Eternal One who was enfleshed, and die in that state of friendship with Him.