The three bases for determining the morality of human acts, as outlined by the catechism of the Catholic church, are object, intention and circumstances. The object of an act is the "chosen good" that initiates it, such as the provision of food for a family.
The object of an act is subtly distinct from its intention, which is the anticipated outcome. An act whose object is to provide food for a starving family might be to end hunger, but it might also be to reduce independence.
The third basis for determining the morality of human acts, circumstances, is concerned with the aggravating or mitigating factors. If the food is stolen from another hungry family, for instance, an otherwise good act becomes evil.