Answer

The laws of the game quite clearly state that when a penalty kick is taken 'a goal is awarded if, before passing between the goal posts and under the cross bar the ball touches either or both of the goal posts and/or the crossbar, and /or the goalkeeper'.

The law also states that 'the referee decides when a penalty kick is complete'.  

Where a penalty kick is taken during normal play and the ball rebounds (from goalposts and/or crossbar and/or goalkeeper) and remains on the field of play, then play continues. The kicker taking the penalty kick may not touch the ball again until it has been touched by another player. If the kicker does touch the ball again before another player then an indirect free kick would be awarded unless it was 'hand ball' in which case a direct free kick would be awarded to the defending team.