Heat olive oil in a skillet over medium heat. Stir in onion; cook until softened, about 5 minutes. Stir in garlic and cook for 1 minute. Add frozen peas, and stir in stock. Season with salt and pepper. Cover, and cook until the peas are tender, about 5 minutes.