The ends only justify the means if the ends are worth more than the means.
An example, if the "ends" is saving the human race from destroying its self, and the "means" is sascrificing a few million to some big old space alien, then sure the "ends" probably justify the "means" as it is generaly understood that the needs of the many out weigh the needs of the few.
However if the "ends" is a cookie and the "means" is killing everyone in the store, then the "ends" dont justify the "means", unless its a really good cookie.
Or if the "ends" was more money than I could ever spend and the "means" was go kill random innocent bystander, personaly the "ends" would justify the "means" personal experiances may vary in this case