Former prime minister Tony Abbott has said that if people had been more willing to heed the message of those like Pauline Hanson over the last two decades, “we would be a better country today”.

In a speech loaded with praise for the controversial One Nation leader, Abbott described her as “a remarkable and a resilient presence in our public life for more than two decades”.

He also said the only way the Coalition could win the next election was to harvest Hanson preferences. “If I can make that more likely, that is a very positive contribution that I can make to the prospects of the Turnbull government.” He said the Coalition should preference One Nation above Labor and the Greens, because the government had been able to work constructively with it in the Senate.

Launching a book of her speeches, Pauline: In Her Own Words, Abbott referenced a “lot of dirty water under the bridge” between them in the past. When he was a member of the Howard government, Abbott was involved in moves that ended in Hanson being jailed for electoral fraud. She said after she was released: “Heaven help this country if Tony Abbott is ever in control of it. I detest the man.”

At the launch Abbott praised Hanson’s “willingness to let the past be the past”.

Abbott said that since 1996 – when she was elected to the House of Representatives as an independent after being disendorsed by the Liberal Party for racist comments – Hanson had been “saying the unsayable, but it’s often been the unsayable that we needed to hear”.

Minor parties were often better at articulating a grievance than formulating a solution, he said. “But let’s face it, every single solution starts with fairly and squarely facing up to the problem. And this is what Pauline Hanson has always sought – to make us face up to what she thinks are our problems.”

He agreed immigration should be scaled back, we should be more proud of Australia, and there should be new coal-fired power stations built, as well as more dams.

“And we do have a problem with Islamism that does require decent Muslims to stand up to the death-to-the-infidel extremists.

"And while I think Pauline has sometimes oversimplified things, she has always had the guts to speak her mind in ways which more sophisticated or supposedly sophisticated politicians have all too often lacked.”

Abbott said Hanson was “absolutely right to stress the social fabric as much as the free market, because there is absolutely no doubt that we do have a problem across the western world right now.

"We have a talking class, often publicly funded, that’s never had it so good. We have a working class which has to work harder and harder just to make ends meet. And we have a welfare class which often needs to be reminded of the importance of having a go.

"And if over the last two decades we had been more ready to heed the message of people like Pauline Hanson and less quick to shoot the messenger, I think we would be a better country today.”

Abbott said in 1996, Hanson had been a lone, sometimes angry voice crying in the wilderness, and he had thought then she was damaging the best conservative government in our history.

“But today I’ve got to say she has worked with her colleagues consistently and constructively in the Senate to help the Coalition government to implement its agenda. She and her colleagues have helped make the Senate so much better than the last one.”

Adversity had made her a “better, deeper person”, Abbott said. “You are certainly confirmation of that old adage that you are always better the second time around.”

Speaking of their relationship, Hanson invoked Nelson Mandela. “After 28 years in prison, he forgave and he forgot, and I think that’s what we need to do.” People in parliament should put their grievances or differences to one side and work together, she said.