For inside mounted shutters you would measure between the side window jambs/casings for the width and from the inside edge of the top jamb/casing to the sill/floor for the height.
For louvers to clear the window the window casement must be at least 1” inch deep. When measuring, make sure the smallest measurement is taken on the width and height. Take measurements in multiple locations.
If the window is 3/8” inch out of square or more, an outside mount must be used.

When there is not enough depth for the shutters you would use an outside mount.
For outside mounted shutters you would measure the distance between the outer edges of the window casement for the width and add 1” inch to each side to accommodate the frame.
From the sill to the top of the window casement and add 1” inch for the height of the frame.