Acts 10:34-35
34 Then Peter opened his mouth, and said, Of a truth I perceive that God is no respecter of persons:
35 But in every nation he that feareth him, and worketh righteousness, is accepted with him.
Does this passage teach that getting to Heaven is accomplished by "working righteousness" and fearing God?
The context of this passage is Peter's dealing with Cornelius, who is a Gentile, and is described as "a devout man, and one that feared God with all his house, which gave much alms to the people, and prayed to God alway" (Acts 10:2). That is to say, he fits the description of the verse in question - he "feared God" and "worked righteousness".
So, what does God do in turn? God grants him further revelation (Acts 10:3-6), and leads him to a soulwinner (Peter) (Acts 10:19-29), who preaches the Gospel to him (Acts 10:38-43).
Notice that God did not appear to Cornelius and say something to the effect of - "Well done Cornelius, you have earned your way to Heaven". Instead, God led him to faith in Christ so that he could have a payment for his sins, which is the only way any human being can be "accepted" (Acts 10:35) by God (John 3:18, Ephesians 1:6, etc.).
The story of Cornelius, then, exemplifies the following verse:
Hebrews 11:6
6 But without faith it is impossible to please him: for he that cometh to God must believe that he is, and that he is a rewarder of them that diligently seek him.
This passage demonstrates an important aspect of God's dealing with the Gentiles, throughout all time. Any person who has ever sought God, like Cornelius, is granted further revelation by God, to bring them to faith in the Messiah.
It does not teach that "working righteousness" is a means of justification, as in the absolute sense, "there is none righteous, no, not one" (Romans 3:10). It does teach that "working righteousness" is often rewarded by God with further revelation.