A witness told Finland's state broadcaster, YLE, that the gunman was dressed in black and appeared to have opened fire at random, hitting one man in the head and a woman in the stomach.
The victims were Prisma employees aged 27, 40, 42 and 45. Two were shot on the shop's first floor, the other two on its second floor, police said.
Another witness said chaos had ensued after the first shots were heard.
"There were loads of people who were crying, and many salespeople who were completely panicked," the witness told Finnish radio.
The gunman was later seen walking towards another shop. He then disappeared, sparking a major manhunt. The shopping centre was evacuated and cordoned off by armed police, and trains were not allowed to stop at the nearby Leppavaara railway station.
At a later news conference, police announced a Prisma employee had also been found dead at her flat in the outskirts of the city. It later emerged that the victim was Shkupolli's ex-girlfriend.
Investigators said they believed her killing had a "domestic" motive, and that there had been a restraining order in place.
"The four victims in the shopping centre were, in a way, outsiders. It looks like the incident is linked to the fifth victim," Chief Inspector Jukka Kaski told a news conference.
"She seems to have been the gunman's main target and the whole shooting is tied up with the relationship between her and the gunman," he added.
Shkupolli then returned to his own home and turned the gun on himself, police said.
Shkupolli was an ethnic Albanian from Kosovo who moved to Finland in 1990, shortly after which he began a relationship with the woman found dead on Thursday, according to Finnish media reports.
Their relationship broke down for the final time last year, when she told police he had threatened to kill her. A restraining order against him was later granted by a local court.
Shkupolli, who worked for a warehousing company organising deliveries to the Prisma shop, was reportedly also married to a woman of Albanian descent, with whom he had a family.
He had a previous conviction for causing bodily harm and had twice been fined for illegal possession of a handgun, in 2003 and 2007, according to YLE.
Gun laws tightened
There is a long tradition of hunting in Finland, which has vast areas of forest and wilderness, but until recently gun crime has been rare.
But two deadly shootings in recent years focused attention on gun laws in a country where young people were permitted to own and use a firearm at 15 years of age if they had parental consent.
My parents were just going up the escalator from the first floor when police started shouting at them to get out of the building
Antti BBC reader, Espoo
In November 2007, an 18-year-old went on a gun rampage at his school in Tuusula, killing seven pupils and a teacher, before turning the gun on himself. He had posted a video warning of the attack on the internet.
Then, in September 2008, a 22-year-old trainee chef killed 10 people at a college before killing himself.
He, too, had put a video on the internet showing himself shooting a gun. After doing that he was interviewed by police, but they decided it was not sufficient reason to revoke his gun licence.
After the second attack, stricter rules on permits for pistols and revolvers were introduced.
Handgun permits would no longer be granted to first-time applicants, the interior ministry said.
Instead, they must train for at least a year at a gun club before being allowed to apply for a permit.
All applicants must also provide a note from a doctor about their mental health and sit an interview with police.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.