This paper describes a simulation method for 2D frequency domain scattering problems in photonics. The technique reduces the spatial dimensionality of the problem by means of global, continuous mode expansion combined with a variational formalism; the resulting equations are solved using a finite element method. Transparent influx boundary conditions and perfectly matched layers are employed at the computational window boundaries. Numerical examples validate the method.