The ending is deliberately ambiguous.
On the one hand, the police do not tend to him at all and the flash photography of the police camera is reminscient of police recording a homicide scene (and a link to the 1952 film noir Sunset Boulevard ending). On the other hand, Alex greets Inspector McCall with a cheery hello.
This fits the ongoing motif throughout the film of appearance versus reality - things are not what they seem. There are numerous examples of this: Hugo has killed a man when he says he hasn't; David's face appears in the opening shot with eyes open and voiceover when in fact he is dead (revealed at end); heaven is where god supposedly resides but in their flat the loft is inhabited by the gothic beast of the paranoid David who is becoming evil; the phone rings with no-one on the line - seems benign but in fact it's the thugs checking that they are home; Cameron appears as a harmless geek but in fact breaks Alex's nose; Juliet seems worth fighting for but in fact she drives the knife deeper and takes the money; the case seems to be full of money but in fact its just newspaper; the forest seems to to be a serene and natural place but in fact it hides a gruesome secret. There are many more.
So why ambiguous? The ambiguity emphasises the theme of money being the root of all evil. The three flatmates choose to dispose of Hugo's body secretly so that they can keep the case of cash. This seems attractive but in fact brings all three to their mutual and self-promulgated destruction. The film is ambiguous so that we are left to decide whether it ended with the good guy winning (Alex eventually emerges as someone who we like because he gallantly attacks David after he has hit Juliet).
Shallow Grave is the most under-recognised contemporary film. John Hodge has written a masterpiece of a screenplay which is as complex and complete as Shakespeare. The film should be listed as film noir and gothic. It has a strong reference to Orson Welles' 1964 film The Trial (based on the novel by Franz Kafka). The use of the macabre baby is also in Trainspotting (1996).