So, I am assuming you got no scripting experience at all. There is indeed a wiki, and I'll point the important sites on it out:
http://wiki.frictionalgames.com/hpl2/amn..._functions
the most important one, it contains all functions of hpl2. Since there are many, press ctrl + f to search for a keyword.
On the left side, you can browse through the categories. Make sure you only look in hlp2. There are scripting tutorials and other ones, so look through everything.
The second most important one is the main game itself. You can just freely look at the main game's maps and scripts, and see how it works. This way, you learn to make good level design, cleverly placed lights and efficient scripts.
Also, this forum has tutorials as well. You can just search for them.
Now for your problem, you should use AddUseItemCallback and SetSwingDoorLocked to lock/unlock the door. if it's a level door, use SetlevelDoorLocked instead. Look those names up on the engine scripts page and try your luck in building your script by looking at tutorials and how FG made their maps and scripts. If it doesn't work and gives you an error, and you can't fix it yourself by looking at that error, just ask again and people will help you out. Just make sure not to "command" others to post you a whole script file, try to make it yourself at least. You learn by your mistakes.
If you instead meant how to get an item into a breakable entity, just do as CrazyArts said.