  We describe the construction of vector valued modular forms transforming
under a given congruence representation of the modular group SL(2,Z) in terms
of theta series. We apply this general setup to obtain closed and easily
computable formulas for conformal characters of rational models of W-algebras.
