Entrapment
Entrapment is inducement[1] to commit a crime, especially by authorities, to get a conviction.[2] The implication is that the person might otherwise have been unlikely to commit the crime. In some countries, entrapment is a possible defence against criminal liability.
Another similar term is agent provocateur, an older French term for the person who does the inducing.
A sting operation is a more sophisticated way to trap criminals. It usually involves leaving a bait, and filming or catching whoever takes the bait.