It sounds like your problem is more with the process than the beans themselves. Here are some general guidelines for pulling good, consistent shots. Keep in mind that you will be limited by how good your machine and grinder are. (As an aside, people who splurge on the machine and skimp out on the grinder are really doing themselves a disservice. The two are equally as important.)
- Use 18 grams of coffee for a double shot of espresso. Weight is a more accurate measurement than volume since you don't have to worry about how packed the cofee is. If you want to get really precise buy a scale from a weed shop. They generally have the best scales.
- Tamp the coffee with 30 lbs of pressure. It's important that you tamp evenly. If the coffee isn't level in the portafilter your espresso probably won't drip evenly out of the spouts. This will affect the quality of your shot.
- Your espresso should begin to drip within 5-7 seconds of pulling the shot
- Your pour should be done after 20-30 seconds.
The main variable that you need to play around with is the grind level. Your machine, humidity levels, and even temperature changes can affect what the "optimal" grind is. As a general rule, espresso grind is always finer than what you would use for filter coffee. In terms of the beans themselves, obviously fresher is better. The cafe I buy my beans from reccomends using them within 10 days of purchase. Any longer than that and they begin to lose too much flavor - even if frozen or stored in airtight bags. They explained why/how but I don't remember the specifics. Anyways, hope that helps.