First, we say the appropriate blessing, and then we do the Commandment. This is the general rule for almost all of the commandments. However, as we just saw with lighting the Shabbos candles, sometimes we have to do the act first, and then say the blessing.
What other commandments must we do the act first and then say the blessing? When a woman goes to the mikvah (immersion) she first immerses herself in the water, and then she says the blessing. The reason for this is that she is going into the mikvah to spiritually cleanse herself. Then, once she is cleansed, she is ready to say Hashem's name in the blessing.
This is also true when we wash for eating bread. First, we cleanse our hands, and then we say the blessing.
Fulfilling a commandment is not just a mechanical act. If you will stop and think of the meaning of the words of the blessing that accompanies that mitzvah you will begin to understand the spiritual significance of fulfilling a commandment.
"Blessed art Thou O' L-rd our G-d…. Who has made us holy with His commandments."
When we fulfill a commandment, we are not just performing a ritual. As the blessing says, by virtue of fulfilling that commandment, we are becoming holy!