Mallow is sent to Korell to figure out what happened to three Foundation ships that suddenly went missing. They just vanished. Poof!
There, he is confronted with a dilemma: sell out a Foundation missionary to the Korellian police, or start a war.
Mallow gives the missionary a bouncer's boot.
He sets up a trade route with Korell's leader, the Commdor. He also discovers nuclear weapons on the planet, ones belonging to the Empire itself.
Next, Mallow heads off to Siwenna and learns the Empire is still kicking (feebly) in the center of the galaxy. They've also sided with Korell in a war against the Foundation.
When he gets home, Mallow is put on trial for murdering that missionary fellow. Too bad Mallow outsmarted Sutt, proving that the missionary was a member of the Korellian Secret Police and not the Foundation.
Mallow is elected mayor, and Korell begins its attack.
No sweat. Mallow has used his trade route with Korell to create a system by which the planet's entire economy requires the Foundation to operate.
When Mallow stops sending trade to Korell, the economy collapses. Mallow wins the war without even fighting one.