The Prime Minister's visit was to coincide with the launch of a national campaign to recruit 20,000 extra police officers across England and Wales, but Mr Burns-Williamson said his speech turned into a rant about Brexit.
The Police and Crime Commissioner said for the Prime Minister to use trainee police officers as "the backdrop to what became a political speech was totally inappropriate".
He added that the officers and West Yorkshire Police "should not have been put in that position" and has demanded a full explanation from the Chief Constable about what happened on Thursday.
Mr Burns-Williamson said: “I had already said in a statement I had issued yesterday that the Government reversal around police recruitment appeared to be a tacit admittance that they had got it wrong over the past 10 years or so, despite the attempts of Boris Johnson on his visit to West Yorkshire to wash over his own Government’s legacy on support and funding for policing.
“I said that before he came, so for him to then use trainee police officers as the backdrop to what became a political speech was totally inappropriate, those officers and West Yorkshire Police should not have been put in that position.
“The news of the recruitment drive and the acknowledgement of how officers and staff have suffered with austerity was completely lost because he was only interested in getting his own agenda across.
“There is no way police officers and staff, who clearly thought it would be all about police recruitment announcements, should have formed a backdrop to a speech of that nature.
“I have asked the Chief Constable John Robins for a full explanation around what happened and he is already aware of my dismay and wider concerns this has created and that the public and the media saw through the attempts by Boris Johnson to cloak his political speech under the guise of police recruitment announcements.”
A West Yorkshire Police trainee appeared to faint during the Prime Minister's speech after he kept officers waiting for more than an hour.
In the final moments of his speech, the trainee standing directly behind the PM put her hand to her head and sat down on the floor, apparently unable to stand any longer.
West Yorkshire Police has been contacted for a statement.