We demonstrate multi-level optical weights embedded in a silicon photonic platform based on ferroelectric domain switching. Ferroelectric barium titanate integrated on silicon resonator structures is used as the memory material. By applying short voltage pulses of 100 ns, we can switch fractions of the ferroelectric domains and thus change the transmission of the waveguides by more than one order of magnitude in a nonvolatile way. We achieve 10 distinct transmission levels, and show iterative switching of the synaptic element based on the polarity, magnitude, and number of applied voltage pulses. Our results are the first experimental demonstration of an electrically driven, multi-level optical memory in integrated photonic circuits. Such non-volatile, ferroelectric weighting element could serve as a key synaptic building block in future photonic neuronal networks.