Lightly spray a 9x13 pan and line with parchment paper (optional) so you can lift the squares out for easy cutting later.
Drain the canned pineapple in a mesh sieve over a bowl, and collect the liquid. Don't squeeze the fruit, just let it drain naturally. Remove the liquid to a small saucepan, whisk in the cornstarch, and heat over medium high heat until it comes to a boil and thickens, stirring constantly. Add the thickened juice back into the pineapple and set aside.
Cream the butter and sugar in a stand mixer or with electric beaters until light and fluffy, at least 3 minutes, scraping down the sides of the bowl as necessary. Beat in the egg and then the extracts.
Whisk together the flour and baking powder and with the mixer on low, beat in the flour mixture, one cup at a time, and then add 2 cups of the shredded coconut. Finish the mixing by hand, a silicone 'spoonula' works great for this..
Remove 2/3 cup of the dough and set aside for the topping. Then press the rest into the bottom of your baking pan. I like to crumble it all over the bottom first to distribute it, and then gently press with my fingers. Make sure to get the whole bottom surface covered. If the dough is sticky, flour your fingers as needed.
Spread the pineapple over the bottom crust, and sprinkle with the remaining coconut. Take the remaining dough and crumble it over the whole surface. I like to press it down VERY lightly with my hands.
Bake for about 35 minutes, or until starting to turn golden. Let the squares cool on a rack before cutting.
Shortbread-y crumb bars are my jam and if you look you'll find lots of them in my dessert recipe index. The great thing about bars like this is that you can use fresh fruit, frozen fruit, preserves, or curd, and each one is a little different from the next. I vary them with different types of flour and add-ins like nuts, coconut, oats, etc.