His comments come after the US president said the British broadcaster Mr Farage and Mr Johnson would be “an unstoppable force”, reports BBC.
Downing Street sources say there are no circumstances in which the Tories would work with the Brexit Party.
In an interview with BBC political editor Laura Kuenssberg, the prime minister said the “difficulty” of doing deals with “any other party” was that it “simply risks putting Jeremy Corbyn into Number 10”.
The UK is going to the polls on 12 December following a further delay to the UK’s departure from the EU, to 31 January 2020.
The BBC will be talking to other party leaders during the course of the campaign.US president Donald Trump told Nigel Farage’s LBC show on Thursday that the Brexit Party leader should team up with Mr Johnson to do “something terrific” and he also criticised the prime minister’s EU withdrawal agreement.
Meanwhile, Mr Farage has called on the prime minister to drop his Brexit deal, unite in a “Leave alliance” or face a Brexit Party candidate in every seat in the election.