Couple of ways you can do this.
First a favourite way of the replacement window boys, build up plastic packers off the framing, with silicone cementing the packers together
making sure that they are both perpendicular to the window frame, aligned and straight to each other (don't expect symmetry to any of the framing except the window frames) Set the cill in place (normally 30 - 40mm proud of the wall) cut and stitch an apron piece in place and with the top plate cut to a snug fit, so as to hold it in place, measure the distances between these at the side plate placements, (these should be the same, 1 - 2 mm doesn't make a whole lot of difference, any more go back a step or two) once cut square and assembled you should have the windows framed with ingoes (window plates) witch are open on the face i.e. you can see the fixing brackets, packers etc. This void should be filled with expanding foam, enough to allow a small protrusion into the room when it's set, using the fixed plasterboard as a guide, cut the set excess foam flush between it and the edges of the ingoes, this will both glue, seal and insulate this troublesome detail. Cut and fix your facings (architraves) and replace and nail the apron piece, removed to allow for foaming.
Expanding foam produces quite a lateral force when it is pumped into a trapped space, so make sure you have some pressure sticks handy to shore as required.
The other way to do it is simply to cut and fit timber packers, scribing over fixing plates etc. still ensuring perpendicularity and straightness, nail these around the window. Either pack the voids out with glass wool insulation so that when the ingoes go on all is snug, or as above, or a mixture of both. Nail and fill as required your facings, then paint to suit.
The first procedure is especially good if you want a varnish finished trim around your window, as it has limited nail heads to show, both should show similar to this
Cheers...bosshogg