TLDR: If someone asks: is Belief in the Prophets (all of them) is essential for salvation? Then the answer would be: Basically yes, but with exceptions.Q: What if a person did a good deed asper Islam but was not Muslim? This question was in the reference of Salvation.
A: Then the question arises, for what sake, with what intention did he do the good deed. If any atheist does a deed, he has to answer the question, why he did it, because he certainly did not do it for the sake of God. (For an atheist, there isn't anything objectively good or evil anyways). If a Christian, in the most common contemporary definition of a Christian, did a good deed, he also has to answer the question, why he did it. If he did it for Christ's sake, which most Christians would say today, then they would not have done it for the sake of the real, actual, existing God, Allah. In both of these cases, the result is the same, but as actions are judged by intentions, there would be no reward for it. Then there is the question, for example, about the Jewess, who watered the dog. What intentions did she have? One has to conclude or assume that while doing the good deed, she had God in her mind and did it for His sake. If someone does good for the sake of good, because his inner sense, his conscience tells him or her that this is a good deed, then this can also count as something done for the sake of God, as conscience is something that was given to man by God, even if the one doing the deed is an atheist. In the Holy Qur'an, it is stated that every good deed and every bad deed will be counted for every human being without exception.
And still, it all depends on you having done enough to determine, whether the God you are worshiping is the actual God or not. If you have done enough, but are not satisfied, and keep on worshiping the God that you think is the actual God, then your deeds also count, as you are not judged over your capacityQ: prostitution has been haram since time imemorial so how did she go to heaven?A:She was a prostitute, but that does not matter, as we do not know which of our good deeds has what impact in the calculation of God. The reward of every deed is relative. And only God knows, in which situation, which deed has what reward. You also might have read the hadith about the guy, who killed 99 people, and then 100 people, but was still rewarded paradise. Same goes for him. It is not in our capacity or I would even say it is not our job to determine, which deed has what reward.If God forgives someone, then nobody can blame Him for doing so, as He is not bound by anything or anyone. Yes, He has bound Himself to not let any good deed go to waste, which means that good deeds will definitely count.Q: Is Salvation open to the people the people who rejected Islam and the Prophet Muhammad(saw)?
A:We are talking about people, who actively rejected Islam and its messenger, not those, who didn't get to hear about them. The question that arises, is whether one, who rejected Islam and the Holy Prophet (saw) had done enough during one's lifetime to research into the truthfulness of them. If, in the eyes of Allah, one had done enough, but one's heart still was not satisfied, then this rejection will not be counted by God, when judging about one's salvationQ: Going back to the previous salvation questions couldn't someone claim, its unfair because you have people of different of faiths who do good things?A:The faiths have claimed about themselves that they are restricted to time and place and have prophesied Islam and the Holy Prophet (saw). A good deed for this day and age is defined by Islam, as this was the will of God. The action-intention dynamic applies on a large scale. If you do a deed, you have to have a reason, an intention for it. If you do it, because of anything else than for the sake of Allah, it can by definition never be a morally good deed. According to Islam, drinking alcohol is not a good deed, but a bad deed. Someone, who does not know about drinking alcohol being a bad deed, will not be judged for this, as actions are judged by their intentions, and he did not know. But this does not make the actual deed a good deed. There the question arises, whether he did enough (in the sight of God) to determine, whether this action had in meantime been declared a bad deed by God. If he did enough (again in the sight of God), and still wasn't satisfied, he can go on drinking, thinking that it is not a bad deed, without consequences. Then, there is also another dimension to it: What did the one doing the deed for the sake of God have an image about God in his mind. Jesus is not God. Shiva and Vishnu are not Gods, so if someone did a deed for the sake those Gods, they did not do them for the sake of the actual existing God, that only Islam today can describe in all accuracy. So a "good deed" is not equal to a good deed.Some notes: II recommend you to read parts from the Postscript of Haqiqat al-wahy. In the English translation: - from pg. 129 to 179- from pg. 209 to 225 https://www.alislam.org/library/books/Haqiqatul-Wahi.pdf
"The issue is that it is his belief that, to attain salvation in the Hereafter, it is not necessary to believe in the Holy Prophet, may peace and blessings of Allah be upon him. Rather, anyone who believes God to be One without partner shall attain salvation (even if he rejects the Holy Prophet, may peace and blessings of Allah be upon him). Obviously, according to him, one can attain salvation even after abandoning Islam, and it is unjust to punish him for this apostasy. For instance, an individual named ‘Abdul-Ghafur recently became an apostate, and joined the Aryah Samaj and was renamed Dharam Pal and has been busy day and night in insulting and refuting the Holy Prophet, may peace and blessings of Allah be upon him. Even he, according to ‘Abdul-Hakim Khan, shall go straight to Paradise, for the Aryas eschew idol worship. However, every sensible person would realise that such a doctrine reduces the advent of Prophets, peace be upon them, to be an exercise in futility and fruitlessness. If one could still attain salvation through belief in God being One even while refuting and opposing the Prophets, peace be upon them, would this not perforce mean that the Prophets were sent to the world in vain —even without them the task could be managed—and there was no great need for their advent?: [Haqiqatul Wahi Page 130]
pgs. 223-225:
However, one to whom sufficient evidence has not been furnished in the estimation of God, and who is a disbeliever and a denier—and even if the Shariah (based as it is upon what is overt) calls them a kafir, and we, too, in our subservience to the Shariah, call them a kafir—he will not be deemed culpable in the estimation of God in the context of the verse: Allah burdens not any soul beyond its capacity (Surah al-Baqarah, 2:287) Of course, we do not have the right to pronounce verdict regarding his salvation. His case rests with God; it is not for us to impose our judgement upon it. As I have just pointed out, only God Almighty knows that—despite the arguments based on rationality and Scriptures, excellence of teachings, and heavenly Signs—who it is to whom the arguments have not been incontrovertibly conveyed. We should not claim with conviction that sufficient evidence has not been furnished to a particular person. We have no knowledge of the inside of a person. By presenting arguments covering all dimensions and by displaying Signs, every Messenger of Allah has meant to furnish sufficient evidence of his truth to the people at large; and God, too, has been his Supporter in it. Therefore, anyone who claims that he has not been provided sufficient evidence is himself responsible for his denial, and the onus of its proof is upon him alone.
He alone will be answerable as to how sufficient evidence was not furnished to him despite all the evidence based on reason and historical record, excellence of teachings, heavenly Signs, and guidance of every kind. It would be simply senseless and absurd to contend that whoever was not furnished with complete arguments, despite knowing about Islam, would attain salvation in their state of denial. Rather, such prattle is an affront to God Almighty, for it would be insolence to the exalted station of the Almighty who sent His Messenger. Moreover, it inherently implies the breach of promise, that, despite the fact that He promised that He would furnish sufficient evidence, He could not do so vis-à-vis those who rejected Him; and they rejected His Messenger, and yet attained salvation. And when we evaluate the Signs which God manifested in support of Islam, and note the evidence based on reason and record, and discover thousands of excellences in Islam of which other religions are bereft, and when we realize that the door for making progress towards God is open only in Islam, and when we find other religions to be in a state in which they are either caught in creature worship or they do not believe that God Almighty is the Creator and Originator of all and the Fountainhead of all blessings, we pity those who spread such preposterous thinking in the world that a person who knew of Islam, but had not been furnished with ‘complete arguments’, will attain salvation. It is obvious that the rejection of facts, even when unintentional, is still harmful. For instance, suppose that doctors have issued a warning about going near women who are infected with syphilis, but someone has consorted with such a woman. Now it would be no use complaining on his part that he was unaware of this warning of the physicians so why did he contract syphilis.