Although it's best to have a wood stove pipe go straight up through the roof for a better draft it's not required to have the wood stove pipe go straight up.
You can run a wood stove pipe through the wall with a through the wall wood stove kit. With the kit you'll have a pipe going straight up and then an elbow to attach the wood stove pipe to the double wall wood stove pipe going through the wall and then another bend on the outside wall to send the pipe up the wall.