Design the shed's roof so that it tilts away from the house. Determine where the shed will meet the house's stucco wall by measuring upward from the shed's walls.
Remove the stucco in the area where the roof will meet the house wall. Chip it away with a cold chisel and a hammer.
Draw a horizontal line on the stucco wall with a pencil to indicate where the shed rafters will meet the wall.
Bolt a 2-by-6-inch piece of lumber onto the stucco wall so that its top edge meets the line you drew on the wall. If you have access to the inside of the wall, use straight, 6-inch bolts and attach washers and nuts from inside of the wall. If you can't access the inside of the wall, use pointed lag bolts that are 6 inches long.
Install the rafters to rest on top of the 2-by-6 piece of lumber. Trim the rafters' ends, making the ends butt flat against the stucco wall. Attach the rafters to the 2-by-6 and directly to the wall with 4-inch long screws.
Cover the rafters with 1/2-inch thick plywood sheathing.
Cover the plywood sheathing with tar paper. Shingle the roof with asphalt shingles.
Attach metal flashing to the joint between the stucco wall and the roof so that it extends up the wall and over the shingles.
Apply new stucco to the area of the house's wall where you removed stucco. Place stucco over the flashing's top edge so that water cannot get behind the flashing.