We propose a novel computational imaging system that enables the generation of Point Spread Functions (PSFs) of userspecified geometry. Key ingredient of our system is a phase-coded aperture which manipulates the phase distribution of the pupil function by inserting a phase modulator. We use a reflective phaseonly liquid crystal-based Spatial Light Modulator (SLM) for phase modulation. Via encoding a grayscale image on the SLM, the refractive index of each cell can be altered. Phase patterns of PSFs with different shapes are optimized by the Gerchberg-Saxton algorithm. A number of non-trivial, complex shaped PSFs has been captured. We further demonstrate how such a system can realize refocusing through encoding a Fresnel lens phase pattern to shift the focal plane.