This is a little late to help our friends the Harveys who screwed into their woodwork to support their gates....
We had to contain the babies in the 'baby-safe' area which of course means baby gates. The big pocket doorway represented a particular problem for us. Its very wide so a standard compression gate won't work and we wanted a doorway for easy access when you have a baby in one hand. Annnnd we really, really, really didn't want to tear up the original moldings around the doorway with a bunch of screws.
Ya its ugly and ghetto-tastic for sure. How ya like that big ole crack on the wall? If I REALLY cared I'd cut the shims even with the wood and paint the whole thing white. I think you'd barely even notice it then.
One funny thing that happened was that as the wood dried out it shrank pretty significantly in length and I had to tap the wedges in a lot more.
Now its so tight that I can not even get the 2by3's to budge. I think it'll stand up to the kids pretty well.