The present invention provides for a non-naturally occurring polyketide synthase (PKS) capable of synthesizing a carboxylic acid or a lactone, and a composition such that a carboxylic acid or lactone is included. The carboxylic acid or lactone, or derivative thereof, is useful as a biofuel. The present invention also provides for a recombinant nucleic acid or vector that encodes such a PKS, and host cells which also have such a recombinant nucleic acid or vector. The present invention also provides for a method of producing such carboxylic acids or lactones using such a PKS.