From a project management this is one of the worst problems to have. The solution you are delivering does not solve the problem it is supposed to solve. The first course of action in this situation is to find out if the problem is that the solution does not fit the agreed scope, or if the agreed scope does not fit what the stakeholders where expecting of the solution. There is not glimmer of hope for you in any of these situations. If it is the first case, the project manager failed to communicate and enforce the scope to the developers. If it is the second case, the project manager failed to gather the correct specifications from the stakeholders and then manage expectations. Let's explore what to do in each of these situations.
The solution does not fit the agreed scope
In this case you need to identify quickly:
a) What part of the scope the solution does not cover.
b) What part of the solution is not in the scope.
c) What part of the solution addresses the scope in a wrong way.
Hopefully most of the scope problems will be related to a). This just means that the solution is incomplete, not wrong. Therefore you just create a project plan to implement the missing features. At this stage I would not worry about b). Remove all the unnecessary features last. You still have to remove them, but maybe you can reuse them before the project is over. The most tricky problem are the features that you identify as falling in the c) category. The question is whether to modify the features or just start them from scratch. You will have to make that decision on a case to case basis.
The agreed scope does not match with the stakeholders expectations
You have to define how real this problem is. Maybe the stakeholders just expected the solution to look different. In which case a few cosmetic adjustments will do the trick and there is not need to setup a process to deal with this problem.
If you find out that the problem is deeper than simple cosmetics, then you need to stop all development. If you are developing the wrong software, there is no need to keep developing. I know this is hard to swallow, but it will show the stakeholders how seriously you take their concerns and also hurry them into giving you detailed feedback.
Once you stopped development, you need to organize a meeting with all the stakeholders and go carefully over the agreed requirements. Map for them requirements to features. Then ask your stakeholders to point to you where the requirements don't reflect what they are expecting, or where your translation of requirements into features is not producing what they are expecting. Do not go into this process lightly. The best way to make sure that stakeholders are serious about their concerns is that they agree to stop development until the review process is over. If they don't agree to stopping development, their concerns are probably not big enough to derail the project. You still need to address them, but they shouldn't break your plan.