The temples that Shotoku built also were educational centers and places that helped provide for public welfare. Shotoku's rule in Japan (from 593-622) was aimed at creating a harmonious society, not only by establishing Buddhism as the state religion but also by pursuing intellectual learning and a system of law and ethics.