To stop weeds growing through pebbles you should put down a barrier such as a those weed barriers that come in rolls that you put down in your garden.
Then add the pebbles over the weed barrier.
If you have pebbles already in an area then remove the weeds and spray the weeds with a weed killer and then remove the pebbles.
Then lay down a weed barrier that is a fabric that can let water pass through but helps keep weeds from growing.
You can also kill weeds using vinegar, salt and dish soap as a natural weed killer.
The only way though to prevent weeds from growing is to treat the ground with some weed killer and then lay down a weed barrier and then put the pebbles down on the weed barrier.