All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Shaving or cutting the hair short is one of the pillars of 'Umrah without which the 'Umrah is incomplete [i.e. void]. If one forgets doing so, or does not know that this is an obligation and goes out of the state of Ihraam and wears form-fitting clothes before shaving or trimming his hair, then such a person should return to the state of Ihraam and take off the form-fitting clothes, and then shaves or trims his hair. By doing this, he completes his 'Umrah.
As regards the prohibitions he had committed while he came out of the state of Ihraam, then he is not sinful, Allaah willing, as confirmed by prominent Muslim scholars.
Allaah Knows best.