Melt the butter in a large frying pan over medium heat. Add the onion and cook for 5 minutes or until softened. Add the garlic, rosemary and beans and cook for 2–3 minutes or until warmed through. Add the lemon juice, salt and pepper and mix to combine. Serve with lemon wedges.