Maybe, maybe not. It kind of depends on the point at which the robbery is called off.
For example, shoplifting generally isn't a crime until one has actually left the store without paying for the merchandise. The state of mind, whether intentional or not, doesn't really matter.
This is a very bad anology.
A more appropriate analogy would be having a police officer in the store while the store is being robbed.
A criminal stands in front of the store keeping weilding a machete. "Give me your money"
The store keeper looks at the police man and asks, "can you help me out here?"
The police officer tells the store keeper about how much the police have done for the store keeper already. He then says "I need you to do us a favour though".
Now this police officer is looking for a promotion at work, he wants to be Chief. His main opposition is another police officer, Lets call him Officer Smith.
The police officer tells the store keeper, that before he helps him out with this robbery, he needs the store keeper to call up the media, get on TV and make an accusation against Officer Smith.
Another witness comes into view, saying "[bless and do not curse][bless and do not curse][bless and do not curse], that sounds like a shake down!"
The police officer then helps the store keeper and stops the robber.
Does this mean no harm no foul?
Or was the Police officer's attempted shakedown something that needs to be dealt with?