Catalyzes the reduction of acetoacetyl-CoA to (R)-3-hydroxybutyryl-CoA (PubMed:26358291). When expressed in E.coli with Synechocystis PhaA, PhaC and PhaE confers the ability to synthesize up to 12% (w/w) poly(3-hydroxybutyrate) (PHB) depending on the carbon source (PubMed:11010896). a (3R)-3-hydroxyacyl-CoA + NADP(+) = a 3-oxoacyl-CoA + H(+) + NADPH Biopolymer metabolism; poly-(R)-3-hydroxybutanoate biosynthesis. Double deletion of phaA and phaB leads to loss of synthesis of PHB, no visible growth phenotype. Poly(3-hydroxyalkanoic acids) (PHA), of which PHB is among the most common compounds, are prokaryotic intracellular storage compounds with potential uses as a renewable, biodegradable thermoplastic. Cyanobacterial PHB synthesis is particularly attractive as cyanobacteria use CO(2) as the carbon source. Nitrogen-free medium induces chlorosis in Synechocystis, leading to the degradation of the photosynthetic apparatus and concomitant accumulation of cytoplasmic polyhydroxyalkanoic acid (PHA) granules which in this cyanobacterium are composed of PHB. Belongs to the short-chain dehydrogenases/reductases (SDR) family.