Dado (+glue) or just screws (+glue) for painted MDF bookcase
There's many variables, many choices. You could just slam some screws into the shelf edges and it may be adequate. Pocket screws are a big improvement because you are no longer screwing into the panel edges. They work really well in cabinet face frames because there is plenty of room for screw embedment. For a bookcase, embedment is limited, so you should plan on more screws to get adequate strength.

You can get more strength by providing support along the back, but the gain is marginal since the front will remain unsupported. The extra cost and weight of a structural back are typically not worth the gain in strength for bookcases.

Another problem with simple butt joints is the glue strength contributes to much less or even none of the overall strength, depending on the type of glue used. This is because butt joints move quite a bit under load, eventually breaking either the glue itself or the bond. Dados greatly restrict the joint movement, allowing glue to contribute a significant portion of the strength. Not to mention the huge strength from the continuous edge support.

But dados require a lot more work. A good compromise is the placement of cleats under the shelf ends, combined with the edge or pocket screws you would typically have used anyway. Nail or screw gluing cleats makes a very strong joint to the side support. The cleat does not move, so the glue bond is significant. The cleat does not need to be very thick, most of the strength is simply the continuous edge support. The height of the cleat should be a good amount to maximize the glue bond area. Use enough fasteners to fully clamp the cleat as the glue sets. Such a cleat reduces the number of edge or pocket screws you need from enough to support everything to enough to hold the shelf in place on the cleat.

Cleats provide much more strength than screws alone, getting you much closer to dado strength. Yet the extra amount of work is minimal, especially considering you'll need fewer edge or pocket screws.