To Join the Chorus of Don't Do DMPCSDMPCs
So, let me start by joining the others and saying that generally DMPCSDMPCs are not a good idea. I have seen it work (and will get to how shortly), but generally I recommend avoiding them. As others have said, it is far too easy for the PCs to rely on the DMPC even if you have successfully bordered yourself. It is also hard to resist the temptation to let the DMPC shine, or have him figure things out for the other players.
If the problem is that the group is underpowered, there are better options including lowering the power of the opposition, tailoring the the quests to their strengths, showering them with magic items to make them more powerful than their level would suggest, etc. You could also consider letting them play more than one character each at the same time (though their inexperience might be an issue).
But you asked how to do it
But you didn't ask us if you should, you asked how. And I have seen it done in ways I would consider successful. The key thing is to make sure the real PCs are firmly in charge and that the DMPC rarely if ever outshines them.
To do this, consider the following options. You don't need to use all of them.
- Make the DMPC considerably weaker, and make sure they fulfill a role the PCs can't. If the PCs are above level one, make the DMPCs a level lower mechanically and story wise make them inexperienced. This means that PCs truly are more powerful and will shine more often without you working so hard to ensure it and gives an in story reason that the DMPC would be following the PCs lead.
- Make the DMPC a strictly supporting role. In one ADNDAD&D game, no one wanted to be a healer. So the GM provided an NPC healer, but he hated direct combat and was cursed to only be able to cast spells on the willing. In short, he would fight to defend himself or if someone was in dire straights, but he mostly tossed out healing and buffing. He could be great support, but couldn't really shine in combat and only rarely did so out of combat by being the GM's information font. That one worked really well.
- Make the DMPC explicitly expendable This way the party won't rely on them too much, or see them as an anchor. One way to do this is to make them mercenaries. As mercenaries they will follow orders more often than take the initiative and they are less likely to be mourned if they die. If they lose them, they go get more mercenaries later.