Boris Johnson has been given a vote of confidence by Parliament. That means that he is quite entitled to go to the Queen and ask her to prorogue Parliament from now until Nov 1. That’s what I’d do.
Another thing he can do is go to the European Council meeting in October and ask for an extension as PM, but then veto the extension as one of the 28 members of the EC (it only takes one country to veto).
Update: Sam Duncan in comments thinks this second tactic won’t work as he thinks that the relevant vote won’t involve the UK.
It’s clear, though, that he wants his election, and he doesn’t want to go to Brussels to ask for an extension (even if he intends to veto that same extension), so I don’t expect either course of action. But the former is what I’d do. Or else the latter. Both guarantee No Deal, and they don’t involve an election which may be lost.
(Sean Gabb has his own ideas for Boris here, but I would just go for the proroguing or the veto.)
Update: Maybe Johnson could also resign as PM just before he has to ask the EU for an extension so there isn’t time for anyone else to do the job?