To draw a shape with a button using KineticJS, you will first need to create a stage and a layer. Then, you can create the button by using the KineticJS Rect shape with the desired properties such as width, height, fill color, stroke color, etc. Next, you will need to add an event listener to the button so that when it is clicked, it will trigger a function to draw the desired shape on the layer.Inside the function, you can create the shape (such as a rectangle, circle, etc.