I'm not sure if I correctly understand the question.
A . Are you talking about taking a lump of plastique and forming it into a shape that resembles a gun hoping to fool someone into thinking it is a gun?
B. Or, are you talking about sabotaging a gun (with plastic explosive) so it will explode when someone shoots it?
If you mean option A, plastic explosive is a lot like modeling clay. You could form it in the shape of a gun, and even paint it, but it will be very, very obvious that it's a hunk of (essentially) clay in a gun shape. (Unless the viewer is at a distance and all the say is a "gun shape")
If you want to take a real gun and rig it to explode there are many simplier ways then modifying it with plastic explosives. Simply blocking the barrel with packed in dirt (think big blockage, a couple inches of thick dirt or more) would be enough to blow the barrel up. That would destroy the guns ability to fire and would likely injury (and possibly even kill) the shooter. It's not fancy, or reliable in that too small a blockage might be shot out instead of blowing up the gun, but it's simple. All the person would have to do is shove the barrel in some somewhat soft earth to pack the barrel with dirt. If the shooter is not killed, or seriously injured, at the very least they'd be very distracted when the barrel bursts when they fire the gun. (Assuming there was enough dirt in the barrel)
If you want something fancier, and more realistic (in my opinion)than taking a gun apart and putting plastic explosives in the grips, etc, you could have a character sabotage the ammo.
In Vietnam U.S. Special Forces ran a secret program where they modified the types of ammo used by North Vietnam and the Viet Cong (rifle and machine gun ammo and mortar shells) by removing the propellant (gunpowder) and substiting plastic explosive. They'd carefully reassemble the ammo and even put the sabotaged rounds back in the ammo crates and seal them so they didn't look like they'd been opened.
The Special Forces would take some of this sabotaged ammo with them on missions and, when they found enemy supplies, they would add this sabotaged ammo to the enemy's supplies of ammo they found. The idea was the enemy would not realize the ammo was sabotaged and distribute it to their troops. The sabotaged ammo would explode when fired, injuring or killing the shooter, and it would hurt the morale of the enemy and make them not trust their own ammo supplies.
The reports I've read indicate it worked pretty well.
So, for your story, you could have the character who is sabotaging the gun sabotage the ammo instead. All they would have to do is have access to the ammo, have some tools to pull the bullet out of the cartridge case (in a pinch pliers or a multi-tool would work) dump the propellent, and substitute a small amount of plastic explosive in it's place. They could use pliers to force the bullet back into the cartridge to put it back together. (If they have access to better, more specialized ammo reloading tools, the switch would not be noticeable. If they used pliers, or a multi tool, a close inspection of the cartridge would show plier marks, etc. But, who is going to pull the ammo of the magazine to look for plier marks, etc)
They would then have to arrange for the doctored ammo to be placed in the gun of the person they want to sabotage. (Lot's of ways to do that. They could "surrender" the gun to the character, or load the gun for them, whatever works best for the story)
If the character who is sabotaging the gun knows how to pull apart a cartridge (not hard), and knows this trick (it is part of military lore), and has access to a small amount of plastic explosives, some pliers or a multi tool, and the ammo, they could sabotage a few rounds in just a few minutes.
If I had access to the other person's gear and wanted to do this I'd try to sabotage enough rounds so that the first round in ALL there mags was rigged to blow. That way, no matter what mag they put in the gun, it would blow. And, if I had to use their gun, i'd know to eject the first round and the other rounds would be OK to shoot.
Or they could just do this to a random round in the mag so it would be a surprise somehwere down the line. (That's how the Special Force did it. They never booby trapped the first round and varied how many rounds in the mag down they went those times taht they sabotaged rounds in a mag instead of ammo in packages).
Edit: Two thing I thought I should add.
1. Any barrel blockage can blow up a gun. Dirt, concrete poured in the barrel and allowed to harden, heck, in the right circumstances, spider nests have been known to blow up a barrel. The gun is not fireable afterwards, but, as I mentioned, the shooter may or may not be seriously injured or killed.
2. From what I've read, the sabotaged rifle and MG rounds in Vietnam DID usually kill or at least seriously injury the shooter. The detonation from the plastic explosive in the cartridge created a larger, more powerful explosion than that caused by a simple blockage in the barrel. The receiver of the gun would blow up and essentially become shrapneal and since a rifle is usually held against your face when it is fired, you can see how this would kill or seriously injure the shooter.