Scalar field effective action for the spontaneous symmetry breaking in gravity