I would like some tips to beat the other pyro being a pyro.
What weapons should I use? Is it more favorable to use a shotgun rather than a flamethrower?
I would say, at flamethrower range, PvP is mostly about who gets the drop on the other, and who has the better dodging/tracking/strafing skills.
However, if you have a shotgun and the other Pyro has a flare gun, you have a huge advantage at medium range, and you should seek to remain at that range.
Against an aggressive opponent, you can sometimes control your range between them. Jump back out of flamethrower range as he chases you with the flamethrower, then close in and switch weapons if he switches to shotgun while still moving forward. Additionally, you can force a medium range encouter with the airblast, allowing your (hopefully) greater dueling skills to win the day.
Since two good pyros will probably be doing this, it often devolves into a shotgun duel.
Here's some very basic advice for flamethrower/flamethrower combat (say you're equipped with a flaregun and so have no shotgun). It is quite possible to defeat another Pyro with the flamethrower without it coming to who has slightly more health, given sufficient skill.
None of this helps if they're staying out of flamethrower range, of course.
It comes down to the player with better movement, I tend to favour the shotgun when fighting Pyro on Pyro due to Pyro taking less damage over time when using the flamethrower on them also no after burn.. Shotgun requires at base 3 good shots to take down a standard pyro (no unlocks etc). However if you know you aren't going to miss at all with your flamethrower then by all means use it due to the highest damage per second out of the two choices.
Hope this sort of helps just for the most part Tf2 is situational and you'll be able to tell what is the best choice over time from experience and past encounters.
If you can get around to their back, the Backburner is especially powerful for taking out other pyros, since they are still vulnerable to the mini-crits that it dishes out. Though you should be aware that if you're taking them head-on, your ability to airblast them is reduced, which is a major disadvantage.
Backscratcher is the best Pyro Melee Weapon for pure damage-dealing, but any flamethrower can beat it in pure DPS. However, if you make an initial strike with the Backscratcher, and then switch to the flamethrower using one of the switch-fast weapons (Reserve Shooter/Degreaser), you may get a greater overall damage output on them.
Also keep in mind that pyros CAN be crit while 'on-fire' immediately after being hit with a flamethrower. I haven't tested this so I cannot guarantee an Axetinguisher strike will work, but a flare strike might, though you'd have to time it incredibly well.